4 # Test nosuid mount option modified from CXFSQA test mount_option_nosuid
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
9 #-----------------------------------------------------------------------
15 echo "QA output created by $seq"
19 status=1 # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
28 # get standard environment, filters and checks
32 # real QA test starts here
33 _supported_fs xfs udf nfs
40 _scratch_mkfs >/dev/null 2>&1
41 _scratch_mount "-o nosuid"
43 mkdir $SCRATCH_MNT/nosuid
44 cp `which ls` $SCRATCH_MNT
45 chmod 700 $SCRATCH_MNT/nosuid
46 chmod 4755 $SCRATCH_MNT/ls
48 su -s/bin/sh - $qa_user -c "$SCRATCH_MNT/ls $SCRATCH_MNT/nosuid >/dev/null 2>&1"
49 if [ $? -eq 0 ] ; then
50 echo "Error: we shouldn't be able to ls the directory"