4 # Make sure user cannot overwrite, append, delete or move a file created by
5 # root. Modified CXFSQA test 940960 and 940558.
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
9 #-----------------------------------------------------------------------
15 echo "QA output created by $seq"
19 status=0 # success is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
26 rm -rf $my_test_subdir
35 s,.*Permission\sdenied.*,Permission denied,;
36 s,.*no\saccess\sto\stty.*,,;
37 s,.*no\sjob\scontrol\sin\sthis\sshell.*,,;
47 if [ "$HOSTOS" == "IRIX" ]
49 echo $1 | /bin/sh "su $qa_user 2>&1" | _filter_user_do
51 echo $1 | su $qa_user 2>&1 | _filter_user_do
55 # get standard environment, filters and checks
59 # real QA test starts here
60 _supported_fs xfs udf nfs
61 _supported_os Linux IRIX
66 my_test_subdir=$testdir/123subdir
68 # create subdir with required permissions
69 mkdir -m 755 $my_test_subdir
71 echo foo > $my_test_subdir/data_coherency.txt
72 # check basic appending to a file
73 echo bar >> $my_test_subdir/data_coherency.txt
76 _user_do "echo goo >> $my_test_subdir/data_coherency.txt"
79 _user_do "echo goo > $my_test_subdir/data_coherency.txt"
82 _user_do "rm $my_test_subdir/data_coherency.txt"
85 _user_do "mv $my_test_subdir/data_coherency.txt $my_test_subdir/data_coherency2.txt"
87 cat $my_test_subdir/data_coherency.txt