Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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)

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group