Skip to content

Commit 46a28f1

Browse files
committed
Fixed everything in and surrounding createdb and dropdb to make it more
error-proof. Rearranged some old code and removed dead sections.
1 parent bfa3b59 commit 46a28f1

File tree

14 files changed

+471
-840
lines changed

14 files changed

+471
-840
lines changed

src/backend/catalog/aclchk.c

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.32 1999/11/24 16:52:31 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.33 2000/01/13 18:26:04 petere Exp $
1111
*
1212
* NOTES
1313
* See acl.h.
@@ -358,23 +358,6 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
358358
usename);
359359
id = (AclId) ((Form_pg_shadow) GETSTRUCT(tuple))->usesysid;
360360

361-
/*
362-
* for the 'pg_database' relation, check the usecreatedb field before
363-
* checking normal permissions
364-
*/
365-
if (strcmp(DatabaseRelationName, relname) == 0 &&
366-
(((Form_pg_shadow) GETSTRUCT(tuple))->usecreatedb))
367-
{
368-
369-
/*
370-
* note that even though the user can now append to the
371-
* pg_database table, there is still additional permissions
372-
* checking in dbcommands.c
373-
*/
374-
if ((mode & ACL_WR) || (mode & ACL_AP))
375-
return ACLCHECK_OK;
376-
}
377-
378361
/*
379362
* Deny anyone permission to update a system catalog unless
380363
* pg_shadow.usecatupd is set. (This is to let superusers protect

0 commit comments

Comments
 (0)