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 88 *
99 *
1010 * 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 $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -333,8 +333,10 @@ aclitemout(PG_FUNCTION_ARGS)
333333 * aclitemeq
334334 * aclitemgt
335335 * 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.
338340 *
339341 * RETURNS:
340342 * a boolean value indicating = or >
@@ -581,8 +583,12 @@ aclcontains(PG_FUNCTION_ARGS)
581583 num = ACL_NUM (acl );
582584 aidat = ACL_DAT (acl );
583585 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 )
585590 PG_RETURN_BOOL (true);
591+ }
586592 PG_RETURN_BOOL (false);
587593}
588594
You can’t perform that action at this time.
0 commit comments