summaryrefslogtreecommitdiff
path: root/src/include/utils/acl.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-07-14 21:46:30 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-07-14 21:46:30 +0000
commitaa1110624c08298393dfce996f7b21809d98d3fd (patch)
treeb698817242cc44d7ad14cbd68cb0b96e751e4e13 /src/include/utils/acl.h
parentbd157821649ae203b9c8ce8daf4ec027a0003351 (diff)
Adjust permissions checking for ALTER OWNER commands: instead of
requiring superuserness always, allow an owner to reassign ownership to any role he is a member of, if that role would have the right to create a similar object. These three requirements essentially state that the would-be alterer has enough privilege to DROP the existing object and then re-CREATE it as the new role; so we might as well let him do it in one step. The ALTER TABLESPACE case is a bit squirrely, but the whole concept of non-superuser tablespace owners is pretty dubious anyway. Stephen Frost, code review by Tom Lane.
Diffstat (limited to 'src/include/utils/acl.h')
-rw-r--r--src/include/utils/acl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index 7defb4e1e28..d3ef0031985 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/utils/acl.h,v 1.81 2005/07/07 20:40:00 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/utils/acl.h,v 1.82 2005/07/14 21:46:30 tgl Exp $
*
* NOTES
* An ACL array is simply an array of AclItems, representing the union
@@ -212,6 +212,7 @@ extern int aclmembers(const Acl *acl, Oid **roleids);
extern bool is_member_of_role(Oid member, Oid role);
extern bool is_admin_of_role(Oid member, Oid role);
+extern void check_is_member_of_role(Oid member, Oid role);
extern void initialize_acl(void);