Re: Howto create a plperlu function as user (not superuser)??

From: David Fetter <david(at)fetter(dot)org>
To: Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Howto create a plperlu function as user (not superuser)??
Date: 2005-09-15 19:46:43
Message-ID: 20050915194643.GB5936@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 14, 2005 at 04:11:25PM +1200, Brent Wood wrote:
> Hi,
>
> My problem is that the language needs to be plperlu (the unsecured
> implementation of plperl) to be allowed to execute the system call
> to get the depth at the specified location. To work, the plperlu
> function must be created by the superuser, who I assume is postgres.

The reason that only the superuser can do this is that a procedure in
any untrusted PL can do things like 'rm -rf $PGDATA' and have it
obeyed.

> That is not me. Sigh. Is there any way I can develop (with the
> various "create or replace function" iterations this wiil probably
> require) this plperlu function as a non superuser?

Nope. Assuming you can't get access as db superuser, you might want
to look into LISTEN/NOTIFY system

http://blackhawk.supernews.net/listen.pl.txt
http://www.postgresql.org/docs/current/static/libpq-notify.html
http://www.postgresql.org/docs/current/static/sql-listen.html

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Emi Lu 2005-09-15 20:14:33 Questions about "varchar" NOT NULL default = char(1) ?
Previous Message Michael Fuhr 2005-09-15 19:38:08 Re: Deadlock