3 #-----------------------------------------------------------------------
4 # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation.
10 # This program is distributed in the hope that it would be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #-----------------------------------------------------------------------
24 # 930290 - xfs directory with no exec perm in ACL denies access
25 # and breaks CAPP evaluation
26 # which pulls out an earlier mod
29 owner=fsgqa@snap.melbourne.sgi.com
32 echo "QA output created by $seq"
36 status=1 # failure is the default!
37 trap "_cleanup; exit \$status" 0 1 2 3 15
44 # get standard environment, filters and checks
49 # Modify as appropriate.
51 _supported_os IRIX Linux
53 # real QA test starts here
62 umount $SCRATCH_DEV >/dev/null 2>&1
63 echo "*** MKFS ***" >>$seq.full
65 _scratch_mkfs >>$seq.full 2>&1 \
66 || _fail "mkfs failed"
67 _scratch_mount >>$seq.full 2>&1 \
68 || _fail "mount failed"
72 # create a dir with out execute perms
75 # make it owned by $acl1
78 # put a file in the directory
79 echo data > subdir/file
80 ls -l subdir/file | awk '{ print $1, $3 }'
82 # add an ACL with a user ACE which has no exec permission
83 if [ "$HOSTOS" == "Linux" ]; then
84 setfacl -m u:$acl1:r subdir
85 elif [ "$HOSTOS" == "IRIX" ]; then
86 chacl u:$acl:r--,g::---,o::--- subdir
92 # With the bug this gives: `ls: subdir/file: Permission denied'
93 # because one needs at least an exec perm somewhere in acl
94 # However, this should not hold true for directories.
95 ls -l subdir/file | awk '{ print $1, $3 }'
97 # With the bug this gives: `subdir/file2: Permission denied'.
98 echo data2 > subdir/file2