1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +03:00

Fixed everything in and surrounding createdb and dropdb to make it more

error-proof. Rearranged some old code and removed dead sections.
This commit is contained in:
Peter Eisentraut
2000-01-13 18:26:18 +00:00
parent bfa3b59d25
commit 46a28f1b14
14 changed files with 473 additions and 842 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.32 1999/11/24 16:52:31 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.33 2000/01/13 18:26:04 petere Exp $
*
* NOTES
* See acl.h.
@@ -358,23 +358,6 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
usename);
id = (AclId) ((Form_pg_shadow) GETSTRUCT(tuple))->usesysid;
/*
* for the 'pg_database' relation, check the usecreatedb field before
* checking normal permissions
*/
if (strcmp(DatabaseRelationName, relname) == 0 &&
(((Form_pg_shadow) GETSTRUCT(tuple))->usecreatedb))
{
/*
* note that even though the user can now append to the
* pg_database table, there is still additional permissions
* checking in dbcommands.c
*/
if ((mode & ACL_WR) || (mode & ACL_AP))
return ACLCHECK_OK;
}
/*
* Deny anyone permission to update a system catalog unless
* pg_shadow.usecatupd is set. (This is to let superusers protect