Re: ERROR: language "c" is not trusted - Mailing list pgsql-general

From Joe Conway
Subject Re: ERROR: language "c" is not trusted
Date
Msg-id 3F023C1D.4050401@joeconway.com
Whole thread Raw
In response to Re: ERROR: language "c" is not trusted  (Chris Albertson <chrisalbertson90278@yahoo.com>)
List pgsql-general
Chris Albertson wrote:
> 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


pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Duplicate key insert question
Next
From: keith@vcsn.com
Date:
Subject: Re: Lotus Domino and PostgreSql in Linux