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.
34 # real QA test starts here
43 _scratch_unmount >/dev/null 2>&1
44 echo "*** MKFS ***" >>$seqres.full
45 echo "" >>$seqres.full
46 _scratch_mkfs >>$seqres.full 2>&1 \
47 || _fail "mkfs failed"
48 _try_scratch_mount >>$seqres.full 2>&1 \
49 || _fail "mount failed"
53 # create a dir with out execute perms
56 # make it owned by $acl1
59 # put a file in the directory
60 echo data > subdir/file
61 _ls_l subdir/file | awk '{ print $1, $3 }'
63 # add an ACL with a user ACE which has no exec permission
64 setfacl -m u:$acl1:r subdir
66 # With the bug this gives: `ls: subdir/file: Permission denied'
67 # because one needs at least an exec perm somewhere in acl
68 # However, this should not hold true for directories.
69 _ls_l subdir/file | awk '{ print $1, $3 }'
71 # With the bug this gives: `subdir/file2: Permission denied'.
72 echo data2 > subdir/file2