diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-22 17:38:20 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-22 17:38:20 +0000 |
commit | bf1e33d24a9611583595eb1c6cc2e7ce3fa01da4 (patch) | |
tree | b5e5df4c4556d631aae7cc3a3cb21489404d598c /src/backend/commands/schemacmds.c | |
parent | a7f49252d2476cc5996b1e9dbb253cdc521fbb7f (diff) | |
download | postgresql-bf1e33d24a9611583595eb1c6cc2e7ce3fa01da4.tar.gz postgresql-bf1e33d24a9611583595eb1c6cc2e7ce3fa01da4.zip |
Fix unwanted denial of ALTER OWNER rights to superusers. There was some
discussion of getting around this by relaxing the checks made for regular
users, but I'm disinclined to toy with the security model right now,
so just special-case it for superusers where needed.
Diffstat (limited to 'src/backend/commands/schemacmds.c')
-rw-r--r-- | src/backend/commands/schemacmds.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c index 65a6edeabc7..f0ae06f15c6 100644 --- a/src/backend/commands/schemacmds.c +++ b/src/backend/commands/schemacmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.33 2005/07/14 21:46:29 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/schemacmds.c,v 1.34 2005/08/22 17:38:20 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -315,7 +315,8 @@ AlterSchemaOwner(const char *name, Oid newOwnerId) * NOTE: This is different from other alter-owner checks in * that the current user is checked for create privileges * instead of the destination owner. This is consistent - * with the CREATE case for schemas. + * with the CREATE case for schemas. Because superusers + * will always have this right, we need no special case for them. */ aclresult = pg_database_aclcheck(MyDatabaseId, GetUserId(), ACL_CREATE); |