Re: BUG #9923: "reassign owned" does not change permissions grantor

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alexey Bashtanov <bashtanov(at)imap(dot)cc>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9923: "reassign owned" does not change permissions grantor
Date: 2015-12-16 22:40:05
Message-ID: 20151216224004.GL2618@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(at)momjian(dot)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?

Report by Alexey Bashtanov

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2015-12-16 23:15:31 Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
Previous Message Feike Steenbergen 2015-12-16 16:18:44 Re: BUG #13817: Query planner strange choose while select/count small part of big table - complete