Re: cpan perl module - plperlu danger?

From: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: cpan perl module - plperlu danger?
Date: 2006-06-22 13:47:42
Message-ID: 36272.216.41.12.254.1150984062.squirrel@webmail.webopticon.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Chille 2006-06-22 13:59:44 Re: simple query terminated by signal 11
Previous Message Bill Moseley 2006-06-22 13:44:14 Re: Missing domain socket after reboot.