pgsql: Fix updateAclDependencies() to not assume that ACL role

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix updateAclDependencies() to not assume that ACL role
Date: 2010-04-05 01:09:53
Message-ID: 20100405010953.3C9E27541D0@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix updateAclDependencies() to not assume that ACL role dependencies can only
be added during GRANT and can only be removed during REVOKE; and fix its
callers to not lie to it about the existing set of dependencies when
instantiating a formerly-default ACL. The previous coding accidentally failed
to malfunction so long as default ACLs contain only references to the object's
owning role, because that role is ignored by updateAclDependencies. However
this is obviously pretty fragile, as well as being an undocumented assumption.
The new coding is a few lines longer but IMO much clearer.

Modified Files:
--------------
pgsql/src/backend/catalog:
aclchk.c (r1.164 -> r1.165)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/aclchk.c?r1=1.164&r2=1.165)
heap.c (r1.372 -> r1.373)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/heap.c?r1=1.372&r2=1.373)
pg_proc.c (r1.173 -> r1.174)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_proc.c?r1=1.173&r2=1.174)
pg_shdepend.c (r1.40 -> r1.41)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_shdepend.c?r1=1.40&r2=1.41)
pgsql/src/include/catalog:
dependency.h (r1.44 -> r1.45)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/dependency.h?r1=1.44&r2=1.45)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-04-05 01:58:03 pgsql: Arrange to remove pg_default_acl entries completely if their ACL
Previous Message Tom Lane 2010-04-05 00:42:24 pgsql: Improve phrasing of warning message for NOTIFY queue getting too