-/*
- * Look for any effective exec access, to allow CAP_DAC_OVERRIDE for exec.
- * Ignore checking for exec in USER_OBJ when there is no mask, because
- * in this "minimal acl" case we don't have any actual acls, and we
- * won't even be here.
- */
-STATIC int
-xfs_acl_find_any_exec(
- xfs_acl_t *fap)
-{
- int i;
- int masked_aces = 0;
- int mask = 0;
-
- for (i = 0; i < fap->acl_cnt; i++) {
- if (fap->acl_entry[i].ae_perm & ACL_EXECUTE) {
- if (fap->acl_entry[i].ae_tag & (ACL_USER_OBJ|ACL_OTHER))
- return 1;
-
- if (fap->acl_entry[i].ae_tag == ACL_MASK)
- mask = fap->acl_entry[i].ae_perm;
- else
- masked_aces |= fap->acl_entry[i].ae_perm;
-
- if ((mask & masked_aces) & ACL_EXECUTE)
- return 1;
- }
- }
-
- return 0;
-}
-