dbTalk Databases Forums  

ERROR: language "c" is not trusted

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss ERROR: language "c" is not trusted in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Albertson
 
Posts: n/a

Default ERROR: language "c" is not trusted - 07-01-2003 , 06:45 PM






I do the following as the user "postgres"

alberts=# CREATE FUNCTION foobar(CSTRING)
alberts-# RETURNS opaque
alberts-# AS '$libdir/mystuff' , 'foobar'
alberts-# LANGUAGE 'c'
alberts-# WITH (isstrict,iscachable);
CREATE FUNCTION

Next I'd like to be able to use the funtion as a "normal" user
so I thy this:

grant USAGE ON LANGUAGE c TO alberts;
ERROR: language "c" is not trusted

OK, now what?





=====
Chris Albertson
Home: 310-376-1029 chrisalbertson90278 (AT) yahoo (DOT) com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson (AT) aero (DOT) org
KG6OMK

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
  #2  
Old   
Chris Albertson
 
Posts: n/a

Default Re: ERROR: language "c" is not trusted - 07-01-2003 , 07:45 PM







Thanks for the hint. This fixed it:

alberts=# UPDATE pg_language
SET lanpltrusted = true
WHERE lanname = 'c';
UPDATE 1

alberts=# grant USAGE ON LANGUAGE c TO alberts;
GRANT



--- Dann Corbit <DCorbit (AT) connx (DOT) com> wrote:
Quote:
http://www.faqs.org/docs/ppbook/r24435.htm

-----Original Message-----
From: Chris Albertson [mailto:chrisalbertson90278 (AT) yahoo (DOT) com]
Sent: Tuesday, July 01, 2003 4:45 PM
To: pgsql-general (AT) postgresql (DOT) org
Subject: [GENERAL] ERROR: language "c" is not trusted


I do the following as the user "postgres"

alberts=# CREATE FUNCTION foobar(CSTRING)
alberts-# RETURNS opaque
alberts-# AS '$libdir/mystuff' , 'foobar'
alberts-# LANGUAGE 'c'
alberts-# WITH (isstrict,iscachable);
CREATE FUNCTION

Next I'd like to be able to use the funtion as a "normal"
user so I thy this:

grant USAGE ON LANGUAGE c TO alberts;
ERROR: language "c" is not trusted

OK, now what?

=====
Chris Albertson
Home: 310-376-1029 chrisalbertson90278 (AT) yahoo (DOT) com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson (AT) aero (DOT) org
KG6OMK

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
  #3  
Old   
Joe Conway
 
Posts: n/a

Default Re: ERROR: language "c" is not trusted - 07-01-2003 , 08:57 PM



Chris Albertson wrote:
Quote:
Thanks for the hint. This fixed it:

alberts=# UPDATE pg_language
SET lanpltrusted = true
WHERE lanname = 'c';
UPDATE 1

alberts=# grant USAGE ON LANGUAGE c TO alberts;
GRANT

Ummm, I doubt that's really what you wanted, was it? Quoting the fine
manual, with emphasis added:

USAGE
For procedural languages, allows the use of the specified language
for the creation of functions in that language. This is the only type of
^^^^^^^^^^^^^^^^^^^^^^^^^
privilege that is applicable to procedural languages.

EXECUTE
Allows the use of the specified function and the use of any
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
operators that are implemented on top of the function. This is the only
type of privilege that is applicable to functions. (This syntax works
for aggregate functions, as well.)

Did you just want to allow non-superusers to execute C language
functions, or create their own? The latter is a huge, gaping security
hole, which is why the language is marked "untrusted".

Joe


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.