]> granicus.if.org Git - postgresql/commit
Fix cascading privilege revoke to notice when privileges are still held.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Aug 2012 21:25:17 +0000 (17:25 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 23 Aug 2012 21:25:17 +0000 (17:25 -0400)
commitfb7b6197b9ed2fe9813ccc0cb4ff548ae255d80d
tree7d338ea2295e8928212f54de55c9ede2ae78838c
parentebcc0158f174336fc50ad33fe4cfa642bdff64a8
Fix cascading privilege revoke to notice when privileges are still held.

If we revoke a grant option from some role X, but X still holds the option
via another grant, we should not recursively revoke the privilege from
role(s) Y that X had granted it to.  This was supposedly fixed as one
aspect of commit 4b2dafcc0b1a579ef5daaa2728223006d1ff98e9, but I must not
have tested it, because in fact that code never worked: it forgot to shift
the grant-option bits back over when masking the bits being revoked.

Per bug #6728 from Daniel German.  Back-patch to all active branches,
since this has been wrong since 8.0.
src/backend/utils/adt/acl.c
src/test/regress/expected/privileges.out
src/test/regress/sql/privileges.sql