pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make inherited TRUNCATE perform access permission checks on pare
Date: Thu, 30 Jan 2020 15:47:50 +0000
Message-ID: <E1ixC2o-0007kl-BB@gemulon.postgresql.org> (raw)

Make inherited TRUNCATE perform access permission checks on parent table only.

Previously, TRUNCATE command through a parent table checked the
permissions on not only the parent table but also the children tables
inherited from it. This was a bug and inherited queries should perform
access permission checks on the parent table only. This commit fixes
that bug.

Back-patch to all supported branches.

Author: Amit Langote
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/CAHGQGwFHdSvifhJE+-GSNqUHSfbiKxaeQQ7HGcYz6SC2n_oDcg@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/606f350de92a15fdb2c6a3c209f60cf74d2825e7

Modified Files
--------------
src/backend/commands/tablecmds.c         | 67 +++++++++++++++++++++++---------
src/test/regress/expected/privileges.out | 21 ++++++++++
src/test/regress/sql/privileges.sql      | 14 +++++++
3 files changed, 84 insertions(+), 18 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1ixC2o-0007kl-BB@gemulon.postgresql.org>
Permalink:  ../E1ixC2o-0007kl-BB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ixC2o-0007kl-BB@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: fujii@postgresql.org
  Subject: Re: pgsql: Make inherited TRUNCATE perform access permission checks on pare
  In-Reply-To: <E1ixC2o-0007kl-BB@gemulon.postgresql.org>
  References: <E1ixC2o-0007kl-BB@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