diff options
| author | Tom Lane | 2010-04-05 01:09:53 +0000 |
|---|---|---|
| committer | Tom Lane | 2010-04-05 01:09:53 +0000 |
| commit | 9029df17c4a885b83ea2b000b4114d438578a51a (patch) | |
| tree | 47b37cd6f3fc1830d6e4a4a79347619c8ced881f /src/include | |
| parent | 80390f493a612a135157ee05cfd1945d234753ce (diff) | |
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.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/dependency.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/catalog/dependency.h b/src/include/catalog/dependency.h index 6d39ecee507..d8a0e0aa639 100644 --- a/src/include/catalog/dependency.h +++ b/src/include/catalog/dependency.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/dependency.h,v 1.44 2010/01/02 16:58:01 momjian Exp $ + * $PostgreSQL: pgsql/src/include/catalog/dependency.h,v 1.45 2010/04/05 01:09:53 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -232,7 +232,7 @@ extern void changeDependencyOnOwner(Oid classId, Oid objectId, Oid newOwnerId); extern void updateAclDependencies(Oid classId, Oid objectId, int32 objectSubId, - Oid ownerId, bool isGrant, + Oid ownerId, int noldmembers, Oid *oldmembers, int nnewmembers, Oid *newmembers); |
