From: Nathan Scott Date: Thu, 30 May 2002 07:21:12 +0000 (+0000) Subject: of course, the perms field is a _bitfield_, so it needs to be checked X-Git-Tag: v2.1.0~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e80ad1c75d68f6d936df5b8352884d02701904db;p=thirdparty%2Fxfsprogs-dev.git of course, the perms field is a _bitfield_, so it needs to be checked slightly differently to the type field, bozo -- fixes that last fix. --- diff --git a/repair/attr_repair.c b/repair/attr_repair.c index ab3e6d184..c6359430d 100644 --- a/repair/attr_repair.c +++ b/repair/attr_repair.c @@ -953,14 +953,8 @@ xfs_acl_valid(xfs_acl_t *aclp) for (i = 0; i < aclp->acl_cnt; i++) { entry = &aclp->acl_entry[i]; - switch (entry->ae_perm) { - case ACL_READ: - case ACL_WRITE: - case ACL_EXECUTE: - break; - default: - goto acl_invalid; - } + if (entry->ae_perm & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE)) + goto acl_invalid; switch (entry->ae_tag) { case ACL_USER_OBJ: if (user++)