2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
8 # 930290 - xfs directory with no exec perm in ACL denies access
9 # and breaks CAPP evaluation
10 # which pulls out an earlier mod
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # get standard environment, filters and checks
31 # Modify as appropriate.
35 # real QA test starts here
44 _scratch_unmount >/dev/null 2>&1
45 echo "*** MKFS ***" >>$seqres.full
46 echo "" >>$seqres.full
47 _scratch_mkfs >>$seqres.full 2>&1 \
48 || _fail "mkfs failed"
49 _try_scratch_mount >>$seqres.full 2>&1 \
50 || _fail "mount failed"
54 # create a dir with out execute perms
57 # make it owned by $acl1
60 # put a file in the directory
61 echo data > subdir/file
62 _ls_l subdir/file | awk '{ print $1, $3 }'
64 # add an ACL with a user ACE which has no exec permission
65 setfacl -m u:$acl1:r subdir
67 # With the bug this gives: `ls: subdir/file: Permission denied'
68 # because one needs at least an exec perm somewhere in acl
69 # However, this should not hold true for directories.
70 _ls_l subdir/file | awk '{ print $1, $3 }'
72 # With the bug this gives: `subdir/file2: Permission denied'.
73 echo data2 > subdir/file2