3 #-----------------------------------------------------------------------
4 # Copyright (c) 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 #-----------------------------------------------------------------------
23 # Test nosuid mount option modified from CXFSQA test mount_option_nosuid
30 echo "QA output created by $seq"
34 status=1 # failure is the default!
35 trap "_cleanup; exit \$status" 0 1 2 3 15
43 # get standard environment, filters and checks
47 # real QA test starts here
48 _supported_fs xfs udf nfs
55 _scratch_mkfs >/dev/null 2>&1
56 _scratch_mount "-o nosuid"
58 mkdir $SCRATCH_MNT/nosuid
59 cp `which ls` $SCRATCH_MNT
60 chmod 700 $SCRATCH_MNT/nosuid
61 chmod 4755 $SCRATCH_MNT/ls
63 su -s/bin/sh - $qa_user -c "$SCRATCH_MNT/ls $SCRATCH_MNT/nosuid >/dev/null 2>&1"
64 if [ $? -eq 0 ] ; then
65 echo "Error: we shouldn't be able to ls the directory"