Re: cpan perl module - plperlu danger? - Mailing list pgsql-general

From A.M.
Subject Re: cpan perl module - plperlu danger?
Date
Msg-id 36272.216.41.12.254.1150984062.squirrel@webmail.webopticon.org
Whole thread Raw
In response to cpan perl module - plperlu danger?  ("Philippe Lang" <philippe.lang@attiksystem.ch>)
Responses Re: cpan perl module - plperlu danger?
List pgsql-general
On Thu, June 22, 2006 7:41 am, Philippe Lang wrote:
> Hi,
>
>
> I would like to access a cpan perl module (FSA::Rules) in a perl
> procedure, inside Postgresql 8.1.4. FSA::Rules is a library that allows you
> to define a finite state machine in perl. No disk access.
>
> In order to to that, I need to use plperlu instead of plperl. And it
> works just fine.
>
> What exactly is the danger using a cpan library under plperlu? How can I
> make sure it won't crash my system, even when run concurrently by a few
> people?

You can't be sure, that is what plperl is for. [But even Safe.pm has had
dozens of bugs revealed over the years- caveat emptor.] A workaround is to
create a set of plperlu functions which can be called by other functions
(using security definer, if necessary). This means that you have to wrap
the major functional components in perl.

Another option is to use plperl as a template to create your own
procedural language which includes all the modules you need while still
locking down everything else.

Good luck.

-M


pgsql-general by date:

Previous
From: Bill Moseley
Date:
Subject: Re: Missing domain socket after reboot.
Next
From: "Thomas Chille"
Date:
Subject: Re: simple query terminated by signal 11