Re: pg_execute_from_file, patch v10 - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: pg_execute_from_file, patch v10
Date
Msg-id 87zks8budd.fsf@hi-media-techno.com
Whole thread Raw
In response to Re: pg_execute_from_file, patch v10  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_execute_from_file, patch v10  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Has anyone thought twice about the security implications of that?
> Not to mention that in most cases, the very last thing we want is to
> have to specify an exact full path?

Well, the security is left same as before, superuser only. And Itagaki
showed that superuser are allowed to read any file anywhere already, so
we didn't change anything here.

> I think we'd be better off insisting that the extension files be under
> sharedir or some such place.

That's the case, but the rework of genfile.c is more general than just
support for extension, or I wouldn't have been asked for a separate
patch, would I?

> In any case, I concur with what I gather Robert is thinking, which is
> that there is no good reason to be exposing any of this at the SQL level.

That used to be done this way, you know, in versions between 0 and 6 of
the patch. Starting at version 7, the underlyiong facilities have been
splitted and exposed, because of the file encoding and server encoding
issues reported by Itagaki.

I propose that more than 2 of you guys get in agreement on what the good
specs are and wake me up after that so that I spawn the right version of
the patch, and if necessary, revise it.

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: Transaction-scope advisory locks
Next
From: Dimitri Fontaine
Date:
Subject: Re: pg_execute_from_file, patch v10