File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.55 2000/12/03 20:45:35 tgl Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.56 2001/01/14 19:23:27 tgl Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -333,8 +333,10 @@ aclitemout(PG_FUNCTION_ARGS)
333
333
* aclitemeq
334
334
* aclitemgt
335
335
* AclItem equality and greater-than comparison routines.
336
- * Two AclItems are equal iff they have the
337
- * same identifier (and identifier type).
336
+ * Two AclItems are considered equal iff they have the
337
+ * same identifier (and identifier type); the mode is ignored.
338
+ * Note that these routines are really only useful for sorting
339
+ * AclItems into identifier order.
338
340
*
339
341
* RETURNS:
340
342
* a boolean value indicating = or >
@@ -581,8 +583,12 @@ aclcontains(PG_FUNCTION_ARGS)
581
583
num = ACL_NUM (acl );
582
584
aidat = ACL_DAT (acl );
583
585
for (i = 0 ; i < num ; ++ i )
584
- if (aclitemeq (aip , aidat + i ))
586
+ {
587
+ /* Note that aclitemeq only considers id, not mode */
588
+ if (aclitemeq (aip , aidat + i ) &&
589
+ aip -> ai_mode == aidat [i ].ai_mode )
585
590
PG_RETURN_BOOL (true);
591
+ }
586
592
PG_RETURN_BOOL (false);
587
593
}
588
594
You can’t perform that action at this time.
0 commit comments