pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Restrict lo_import()/lo_export() via SQL permissions not hard-wi
Date: Thu, 09 Nov 2017 17:56:15 +0000
Message-ID: <E1eCr3n-0004y5-Rc@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Restrict lo_import()/lo_export() via SQL permissions not hard-wired checks.

While it's generally unwise to give permissions on these functions to
anyone but a superuser, we've been moving away from hard-wired permission
checks inside functions in favor of using the SQL permission system to
control access.  Bring lo_import() and lo_export() into compliance with
that approach.

In particular, this removes the manual configuration option
ALLOW_DANGEROUS_LO_FUNCTIONS.  That dates back to 1999 (commit 4cd4a54c8);
it's unlikely anyone has used it in many years.  Moreover, if you really
want such behavior, now you can get it with GRANT ... TO PUBLIC instead.

Michael Paquier

Discussion: https://postgr.es/m/CAB7nPqRHmNOYbETnc_2EjsuzSM00Z+BWKv9sy6tnvSd5gWT_JA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5ecc0d738e5864848bbc2d1d97e56d5846624ba2

Modified Files
--------------
src/backend/catalog/system_views.sql     | 10 ++++++++++
src/backend/libpq/be-fsstubs.c           | 16 ----------------
src/include/catalog/catversion.h         |  2 +-
src/include/pg_config_manual.h           | 10 ----------
src/test/regress/expected/privileges.out | 10 ++++++----
src/test/regress/sql/privileges.sql      |  2 ++
6 files changed, 19 insertions(+), 31 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1eCr3n-0004y5-Rc@gemulon.postgresql.org>
Permalink:  ../E1eCr3n-0004y5-Rc@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eCr3n-0004y5-Rc@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Restrict lo_import()/lo_export() via SQL permissions not hard-wi
  In-Reply-To: <E1eCr3n-0004y5-Rc@gemulon.postgresql.org>
  References: <E1eCr3n-0004y5-Rc@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox