pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Alexey Bashtanov <bashtanov@imap.cc>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #9923: "reassign owned" does not change permissions grantor
Date: Thu, 17 Dec 2015 15:14:53 -0500
Message-ID: <20151217201453.GA27799@momjian.us> (raw)
In-Reply-To: <20151216224004.GL2618@alvherre.pgsql>
References: <5344F82D.8000809@imap.cc>
	<20150109181948.GC26812@momjian.us>
	<20150122173756.GG27749@momjian.us>
	<20151216224004.GL2618@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Wed, Dec 16, 2015 at 07:40:05PM -0300, Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > On Fri, Jan  9, 2015 at 01:19:48PM -0500, Bruce Momjian wrote:
> > > I can confirm this bug report from April, and your analysis of the fixes
> > > --- we were missing calls to aclnewowner() for types, foreign servers,
> > > and foreign data wrappers, for both REASSIGN and ALTER OWNER TO.
> > > 
> > > With the attached SQL script you can see the ACL fields properly
> > > changing to match the object owner (attached).  Without the patch, only
> > > the table's ACL changes.
> > > 
> > > The patch also changes the regression output --- I think that is because
> > > the object ownership changes remove certain duplicates from the ACL
> > > list.
> > 
> > Patch applied.  Thank you for the excellent bug report.
> 
> I just realized that you didn't backpatch this bug fix, and therefore my
> fix for bug #13666 fails to cherry-pick sanely on 9.4 and earlier.
> 
> I think this should be back-patched.
> 
> This is the changelog entry:
> 
> Author: Bruce Momjian <bruce@momjian.us>
> Branch: master Release: REL9_5_BR [59367fdf9] 2015-01-22 12:36:55 -0500
> 
>     adjust ACL owners for REASSIGN and ALTER OWNER TO
>     
>     When REASSIGN and ALTER OWNER TO are used, both the object owner and ACL
>     list should be changed from the old owner to the new owner. This patch
>     fixes types, foreign data wrappers, and foreign servers to change their
>     ACL list properly;  they already changed owners properly.
>     
>     BACKWARD INCOMPATIBILITY?

Backpatching seems fine to me.  I was just concerned if anyone was
relying on the existing buggy behavior.  We do list this item as a 9.5
incompatibility, so the question is whether we can add an
incompatibility to back branches:

      Fix <link linkend="SQL-REASSIGN-OWNED"><command>REASSIGN OWNED</></>
      and <link linkend="SQL-ALTERTYPE"><command>ALTER OWNER TO</></>
      to properly update permissions lists (ACLs) when changing ownership of
      types, foreign data wrappers, and foreign servers (Bruce Momjian)

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Roman grave inscription                             +


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



view thread (10+ messages)  latest in thread

Message-ID: <20151217201453.GA27799@momjian.us>
Permalink:  ../20151217201453.GA27799@momjian.us/
Also on:    postgresql.org/message-id/20151217201453.GA27799@momjian.us

 · 

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-bugs@postgresql.org
  Cc: bruce@momjian.us, alvherre@2ndquadrant.com, bashtanov@imap.cc
  Subject: Re: BUG #9923: "reassign owned" does not change permissions grantor
  In-Reply-To: <20151217201453.GA27799@momjian.us>
  References: <5344F82D.8000809@imap.cc> <20150109181948.GC26812@momjian.us> <20150122173756.GG27749@momjian.us> <20151216224004.GL2618@alvherre.pgsql> <20151217201453.GA27799@momjian.us>

* 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