]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
of course, the perms field is a _bitfield_, so it needs to be checked
authorNathan Scott <nathans@sgi.com>
Thu, 30 May 2002 07:21:12 +0000 (07:21 +0000)
committerNathan Scott <nathans@sgi.com>
Thu, 30 May 2002 07:21:12 +0000 (07:21 +0000)
slightly differently to the type field, bozo -- fixes that last fix.

repair/attr_repair.c

index ab3e6d1849d750d3c53230beb77107ba538c87fe..c6359430d985b537a3d514ce1bbfe7999f69f6aa 100644 (file)
@@ -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++)