Re: Re: lo wrappers - still working on it - Mailing list pgsql-general

From Tom Lane
Subject Re: Re: lo wrappers - still working on it
Date
Msg-id 27780.994262760@sss.pgh.pa.us
Whole thread Raw
In response to Re: lo wrappers - still working on it  (Scott Holmes <sholmes@pacificnet.net>)
Responses Re: Re: lo wrappers - still working on it
List pgsql-general
Scott Holmes  <sholmes@pacificnet.net> writes:
> I tried this initially, it results in an error and the following warning:
> You must have Postgres superuser privilege to use server-side lo_export().
> Anyone can use the client-side lo_export provided by libpq.

There's a very good reason for that restriction: lo_export/lo_import
allow a client to command reading and writing of any file that the
server can access, with the server's permissions.  Your proposed
functions appear to be the same thing without any security check.

If you are intent on installing such a security hole into your
system, you can define ALLOW_DANGEROUS_LO_FUNCTIONS in config.h
when you build the server.  But God help you if any unfriendlies
get access to your database.

            regards, tom lane

pgsql-general by date:

Previous
From: "Trewern, Ben"
Date:
Subject: RE: FOREIGN KEY
Next
From: Tom Lane
Date:
Subject: Re: ERROR: fmgr_info: function 0: cache lookup failed