echo
}
-nr=0
-# Commit to a non-exec file by an unprivileged user clears suid but
-# leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, non-exec file $verb"
+# Commit to a non-exec file by an unprivileged user clears suid and sgid.
+echo "Test 1 - qa_user, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a group-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, group-exec file $verb"
+# Commit to a group-exec file by an unprivileged user clears suid and sgid.
+echo "Test 2 - qa_user, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a user-exec file by an unprivileged user clears suid but
-# not sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, user-exec file $verb"
+# Commit to a user-exec file by an unprivileged user clears suid and sgid.
+echo "Test 3 - qa_user, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a all-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, all-exec file $verb"
+# Commit to a all-exec file by an unprivileged user clears suid and sgid.
+echo "Test 4 - qa_user, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a non-exec file by root clears suid but leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, non-exec file $verb"
+# Commit to a non-exec file by root leaves suid and sgid.
+echo "Test 5 - root, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a group-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, group-exec file $verb"
+# Commit to a group-exec file by root leaves suid and sgid.
+echo "Test 6 - root, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a user-exec file by root clears suid but not sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, user-exec file $verb"
+# Commit to a user-exec file by root leaves suid and sgid.
+echo "Test 7 - root, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a all-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, all-exec file $verb"
+# Commit to a all-exec file by root leaves suid and sgid.
+echo "Test 8 - root, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "" "$verb" 64k 64k
+# Commit to a non-exec file by an unprivileged user leaves sgid.
+echo "Test 9 - qa_user, non-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a group-exec file by an unprivileged user clears sgid
+echo "Test 10 - qa_user, group-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a user-exec file by an unprivileged user clears sgid
+echo "Test 11 - qa_user, user-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,u+x,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a all-exec file by an unprivileged user clears sgid.
+echo "Test 12 - qa_user, all-exec file $verb, only sgid"
+setup_testfile
+chmod a+rwx,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
# success, all done
status=0
exit
6777 -rwsrwsrwx TEST_DIR/683/a
6777 -rwsrwsrwx TEST_DIR/683/a
+Test 9 - qa_user, non-exec file falloc, only sgid
+2666 -rw-rwSrw- TEST_DIR/683/a
+2666 -rw-rwSrw- TEST_DIR/683/a
+
+Test 10 - qa_user, group-exec file falloc, only sgid
+2676 -rw-rwsrw- TEST_DIR/683/a
+676 -rw-rwxrw- TEST_DIR/683/a
+
+Test 11 - qa_user, user-exec file falloc, only sgid
+2766 -rwxrwSrw- TEST_DIR/683/a
+2766 -rwxrwSrw- TEST_DIR/683/a
+
+Test 12 - qa_user, all-exec file falloc, only sgid
+2777 -rwxrwsrwx TEST_DIR/683/a
+777 -rwxrwxrwx TEST_DIR/683/a
+
echo
}
-nr=0
-# Commit to a non-exec file by an unprivileged user clears suid but
-# leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, non-exec file $verb"
+# Commit to a non-exec file by an unprivileged user clears suid and sgid.
+echo "Test 1 - qa_user, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a group-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, group-exec file $verb"
+# Commit to a group-exec file by an unprivileged user clears suid and sgid.
+echo "Test 2 - qa_user, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a user-exec file by an unprivileged user clears suid but
-# not sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, user-exec file $verb"
+# Commit to a user-exec file by an unprivileged user clears suid and sgid.
+echo "Test 3 - qa_user, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a all-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, all-exec file $verb"
+# Commit to a all-exec file by an unprivileged user clears suid and sgid.
+echo "Test 4 - qa_user, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a non-exec file by root clears suid but leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, non-exec file $verb"
+# Commit to a non-exec file by root leaves suid and sgid.
+echo "Test 5 - root, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a group-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, group-exec file $verb"
+# Commit to a group-exec file by root leaves suid and sgid.
+echo "Test 6 - root, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a user-exec file by root clears suid but not sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, user-exec file $verb"
+# Commit to a user-exec file by root leaves suid and sgid.
+echo "Test 7 - root, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a all-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, all-exec file $verb"
+# Commit to a all-exec file by root leaves suid and sgid.
+echo "Test 8 - root, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "" "$verb" 64k 64k
+# Commit to a non-exec file by an unprivileged user leaves sgid.
+echo "Test 9 - qa_user, non-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a group-exec file by an unprivileged user clears sgid
+echo "Test 10 - qa_user, group-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a user-exec file by an unprivileged user clears sgid
+echo "Test 11 - qa_user, user-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,u+x,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a all-exec file by an unprivileged user clears sgid.
+echo "Test 12 - qa_user, all-exec file $verb, only sgid"
+setup_testfile
+chmod a+rwx,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
# success, all done
status=0
exit
6777 -rwsrwsrwx TEST_DIR/684/a
6777 -rwsrwsrwx TEST_DIR/684/a
+Test 9 - qa_user, non-exec file fpunch, only sgid
+2666 -rw-rwSrw- TEST_DIR/684/a
+2666 -rw-rwSrw- TEST_DIR/684/a
+
+Test 10 - qa_user, group-exec file fpunch, only sgid
+2676 -rw-rwsrw- TEST_DIR/684/a
+676 -rw-rwxrw- TEST_DIR/684/a
+
+Test 11 - qa_user, user-exec file fpunch, only sgid
+2766 -rwxrwSrw- TEST_DIR/684/a
+2766 -rwxrwSrw- TEST_DIR/684/a
+
+Test 12 - qa_user, all-exec file fpunch, only sgid
+2777 -rwxrwsrwx TEST_DIR/684/a
+777 -rwxrwxrwx TEST_DIR/684/a
+
echo
}
-nr=0
-# Commit to a non-exec file by an unprivileged user clears suid but
-# leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, non-exec file $verb"
+# Commit to a non-exec file by an unprivileged user clears suid and sgid.
+echo "Test 1 - qa_user, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a group-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, group-exec file $verb"
+# Commit to a group-exec file by an unprivileged user clears suid and sgid.
+echo "Test 2 - qa_user, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a user-exec file by an unprivileged user clears suid but
-# not sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, user-exec file $verb"
+# Commit to a user-exec file by an unprivileged user clears suid and sgid.
+echo "Test 3 - qa_user, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a all-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, all-exec file $verb"
+# Commit to a all-exec file by an unprivileged user clears suid and sgid.
+echo "Test 4 - qa_user, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a non-exec file by root clears suid but leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, non-exec file $verb"
+# Commit to a non-exec file by root leaves suid and sgid.
+echo "Test 5 - root, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a group-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, group-exec file $verb"
+# Commit to a group-exec file by root leaves suid and sgid.
+echo "Test 6 - root, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a user-exec file by root clears suid but not sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, user-exec file $verb"
+# Commit to a user-exec file by root leaves suid and sgid.
+echo "Test 7 - root, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a all-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, all-exec file $verb"
+# Commit to a all-exec file by root leaves suid and sgid.
+echo "Test 8 - root, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "" "$verb" 64k 64k
+# Commit to a non-exec file by an unprivileged user leaves sgid.
+echo "Test 9 - qa_user, non-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a group-exec file by an unprivileged user clears sgid
+echo "Test 10 - qa_user, group-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a user-exec file by an unprivileged user clears sgid
+echo "Test 11 - qa_user, user-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,u+x,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a all-exec file by an unprivileged user clears sgid.
+echo "Test 12 - qa_user, all-exec file $verb, only sgid"
+setup_testfile
+chmod a+rwx,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
# success, all done
status=0
exit
6777 -rwsrwsrwx TEST_DIR/685/a
6777 -rwsrwsrwx TEST_DIR/685/a
+Test 9 - qa_user, non-exec file fzero, only sgid
+2666 -rw-rwSrw- TEST_DIR/685/a
+2666 -rw-rwSrw- TEST_DIR/685/a
+
+Test 10 - qa_user, group-exec file fzero, only sgid
+2676 -rw-rwsrw- TEST_DIR/685/a
+676 -rw-rwxrw- TEST_DIR/685/a
+
+Test 11 - qa_user, user-exec file fzero, only sgid
+2766 -rwxrwSrw- TEST_DIR/685/a
+2766 -rwxrwSrw- TEST_DIR/685/a
+
+Test 12 - qa_user, all-exec file fzero, only sgid
+2777 -rwxrwsrwx TEST_DIR/685/a
+777 -rwxrwxrwx TEST_DIR/685/a
+
echo
}
-nr=0
-# Commit to a non-exec file by an unprivileged user clears suid but
-# leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, non-exec file $verb"
+# Commit to a non-exec file by an unprivileged user clears suid and sgid.
+echo "Test 1 - qa_user, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a group-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, group-exec file $verb"
+# Commit to a group-exec file by an unprivileged user clears suid and sgid.
+echo "Test 2 - qa_user, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a user-exec file by an unprivileged user clears suid but
-# not sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, user-exec file $verb"
+# Commit to a user-exec file by an unprivileged user clears suid and sgid.
+echo "Test 3 - qa_user, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a all-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, all-exec file $verb"
+# Commit to a all-exec file by an unprivileged user clears suid and sgid.
+echo "Test 4 - qa_user, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a non-exec file by root clears suid but leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, non-exec file $verb"
+# Commit to a non-exec file by root leaves suid and sgid.
+echo "Test 5 - root, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a group-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, group-exec file $verb"
+# Commit to a group-exec file by root leaves suid and sgid.
+echo "Test 6 - root, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a user-exec file by root clears suid but not sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, user-exec file $verb"
+# Commit to a user-exec file by root leaves suid and sgid.
+echo "Test 7 - root, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a all-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, all-exec file $verb"
+# Commit to a all-exec file by root leaves suid and sgid.
+echo "Test 8 - root, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "" "$verb" 64k 64k
+# Commit to a non-exec file by an unprivileged user leaves sgid.
+echo "Test 9 - qa_user, non-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a group-exec file by an unprivileged user clears sgid
+echo "Test 10 - qa_user, group-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a user-exec file by an unprivileged user clears sgid
+echo "Test 11 - qa_user, user-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,u+x,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a all-exec file by an unprivileged user clears sgid.
+echo "Test 12 - qa_user, all-exec file $verb, only sgid"
+setup_testfile
+chmod a+rwx,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
# success, all done
status=0
exit
6777 -rwsrwsrwx TEST_DIR/686/a
6777 -rwsrwsrwx TEST_DIR/686/a
+Test 9 - qa_user, non-exec file finsert, only sgid
+2666 -rw-rwSrw- TEST_DIR/686/a
+2666 -rw-rwSrw- TEST_DIR/686/a
+
+Test 10 - qa_user, group-exec file finsert, only sgid
+2676 -rw-rwsrw- TEST_DIR/686/a
+676 -rw-rwxrw- TEST_DIR/686/a
+
+Test 11 - qa_user, user-exec file finsert, only sgid
+2766 -rwxrwSrw- TEST_DIR/686/a
+2766 -rwxrwSrw- TEST_DIR/686/a
+
+Test 12 - qa_user, all-exec file finsert, only sgid
+2777 -rwxrwsrwx TEST_DIR/686/a
+777 -rwxrwxrwx TEST_DIR/686/a
+
echo
}
-nr=0
-# Commit to a non-exec file by an unprivileged user clears suid but
-# leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, non-exec file $verb"
+# Commit to a non-exec file by an unprivileged user clears suid and sgid.
+echo "Test 1 - qa_user, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a group-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, group-exec file $verb"
+# Commit to a group-exec file by an unprivileged user clears suid and sgid.
+echo "Test 2 - qa_user, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a user-exec file by an unprivileged user clears suid but
-# not sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, user-exec file $verb"
+# Commit to a user-exec file by an unprivileged user clears suid and sgid.
+echo "Test 3 - qa_user, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a all-exec file by an unprivileged user clears suid and
-# sgid.
-nr=$((nr + 1))
-echo "Test $nr - qa_user, all-exec file $verb"
+# Commit to a all-exec file by an unprivileged user clears suid and sgid.
+echo "Test 4 - qa_user, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "$qa_user" "$verb" 64k 64k
-# Commit to a non-exec file by root clears suid but leaves sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, non-exec file $verb"
+# Commit to a non-exec file by root leaves suid and sgid.
+echo "Test 5 - root, non-exec file $verb"
setup_testfile
chmod a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a group-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, group-exec file $verb"
+# Commit to a group-exec file by root leaves suid and sgid.
+echo "Test 6 - root, group-exec file $verb"
setup_testfile
chmod g+x,a+rws $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a user-exec file by root clears suid but not sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, user-exec file $verb"
+# Commit to a user-exec file by root leaves suid and sgid.
+echo "Test 7 - root, user-exec file $verb"
setup_testfile
chmod u+x,a+rws,g-x $junk_file
commit_and_check "" "$verb" 64k 64k
-# Commit to a all-exec file by root clears suid and sgid.
-nr=$((nr + 1))
-echo "Test $nr - root, all-exec file $verb"
+# Commit to a all-exec file by root leaves suid and sgid.
+echo "Test 8 - root, all-exec file $verb"
setup_testfile
chmod a+rwxs $junk_file
commit_and_check "" "$verb" 64k 64k
+# Commit to a non-exec file by an unprivileged user leaves sgid.
+echo "Test 9 - qa_user, non-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a group-exec file by an unprivileged user clears sgid
+echo "Test 10 - qa_user, group-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a user-exec file by an unprivileged user clears sgid
+echo "Test 11 - qa_user, user-exec file $verb, only sgid"
+setup_testfile
+chmod a+rw,u+x,g+rws $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
+# Commit to a all-exec file by an unprivileged user clears sgid.
+echo "Test 12 - qa_user, all-exec file $verb, only sgid"
+setup_testfile
+chmod a+rwx,g+rwxs $junk_file
+commit_and_check "$qa_user" "$verb" 64k 64k
+
# success, all done
status=0
exit
6777 -rwsrwsrwx TEST_DIR/687/a
6777 -rwsrwsrwx TEST_DIR/687/a
+Test 9 - qa_user, non-exec file fcollapse, only sgid
+2666 -rw-rwSrw- TEST_DIR/687/a
+2666 -rw-rwSrw- TEST_DIR/687/a
+
+Test 10 - qa_user, group-exec file fcollapse, only sgid
+2676 -rw-rwsrw- TEST_DIR/687/a
+676 -rw-rwxrw- TEST_DIR/687/a
+
+Test 11 - qa_user, user-exec file fcollapse, only sgid
+2766 -rwxrwSrw- TEST_DIR/687/a
+2766 -rwxrwSrw- TEST_DIR/687/a
+
+Test 12 - qa_user, all-exec file fcollapse, only sgid
+2777 -rwxrwsrwx TEST_DIR/687/a
+777 -rwxrwxrwx TEST_DIR/687/a
+