From b0bcf8aab2da6710ff8842b86fed93571e143cc8 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 21 Apr 2002 00:26:44 +0000 Subject: Restructure AclItem representation so that we can have more than eight different privilege bits (might as well make use of the space we were wasting on padding). EXECUTE and USAGE bits for procedures, languages now are separate privileges instead of being overlaid on SELECT. Add privileges for namespaces and databases. The GRANT and REVOKE commands work for these object types, but we don't actually enforce the privileges yet... --- src/backend/commands/functioncmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/functioncmds.c') diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 0bee7cdced1..86b7cd50ec7 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.1 2002/04/15 05:22:03 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.2 2002/04/21 00:26:42 tgl Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -325,7 +325,7 @@ CreateFunction(ProcedureStmt *stmt) languageStruct = (Form_pg_language) GETSTRUCT(languageTuple); if (!((languageStruct->lanpltrusted - && pg_language_aclcheck(languageOid, GetUserId()) == ACLCHECK_OK) + && pg_language_aclcheck(languageOid, GetUserId(), ACL_USAGE) == ACLCHECK_OK) || superuser())) elog(ERROR, "permission denied"); -- cgit v1.2.3