7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.5 1998/02/11 19:09:42 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.6 1998/02/24 03:31:45 scrappy Exp $
11
11
*
12
12
* NOTES
13
13
* See acl.h.
39
39
#include "utils/tqual.h"
40
40
#include "fmgr.h"
41
41
42
- static int32 aclcheck (Acl * acl , AclId id , AclIdType idtype , AclMode mode );
42
+ static int32 aclcheck (char * relname , Acl * acl , AclId id , AclIdType idtype , AclMode mode );
43
43
44
44
/*
45
45
* Enable use of user relations in place of real system catalogs.
@@ -150,7 +150,7 @@ ChangeAcl(char *relname,
150
150
elog (DEBUG , "ChangeAcl: using default ACL" );
151
151
#endif
152
152
/* old_acl = acldefault(((Form_pg_class) GETSTRUCT(htp))->relowner); */
153
- old_acl = acldefault ();
153
+ old_acl = acldefault (relname );
154
154
free_old_acl = 1 ;
155
155
}
156
156
@@ -281,7 +281,7 @@ in_group(AclId uid, AclId gid)
281
281
* any one of the requirements of 'mode'. Returns 0 otherwise.
282
282
*/
283
283
static int32
284
- aclcheck (Acl * acl , AclId id , AclIdType idtype , AclMode mode )
284
+ aclcheck (char * relname , Acl * acl , AclId id , AclIdType idtype , AclMode mode )
285
285
{
286
286
unsigned i ;
287
287
AclItem * aip ,
@@ -292,7 +292,7 @@ aclcheck(Acl *acl, AclId id, AclIdType idtype, AclMode mode)
292
292
/* if no acl is found, use world default */
293
293
if (!acl )
294
294
{
295
- acl = acldefault ();
295
+ acl = acldefault (relname );
296
296
}
297
297
298
298
num = ACL_NUM (acl );
@@ -475,7 +475,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
475
475
Anum_pg_class_relowner ,
476
476
RelationGetTupleDescriptor (relation ),
477
477
(bool * ) NULL );
478
- acl = aclownerdefault (ownerId );
478
+ acl = aclownerdefault (relname , ownerId );
479
479
}
480
480
#else
481
481
{ /* This is why the syscache is great... */
@@ -511,7 +511,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
511
511
heap_close (relation );
512
512
}
513
513
#endif
514
- result = aclcheck (acl , id , (AclIdType ) ACL_IDTYPE_UID , mode );
514
+ result = aclcheck (relname , acl , id , (AclIdType ) ACL_IDTYPE_UID , mode );
515
515
if (acl )
516
516
pfree (acl );
517
517
return (result );
0 commit comments