Commit 8adceeb2 authored by Ben Walton's avatar Ben Walton Committed by Wayne Davison

Testsuite/dir-sgid: use symbolic mode to set sgid bit

The chmod on Solaris (9 and 10) cannot set the sgid bit on a directory
using absolute mode, so use symbolic mode.  Avoids a skipped test.
parent 0c7fdf70
......@@ -26,7 +26,7 @@ testit() {
echo "File!" >"$scratchdir/file"
echo "#!/bin/sh" >"$scratchdir/program"
mkdir "$scratchdir/dir"
chmod 2764 "$scratchdir/dir" || test_skipped "Can't chmod"
chmod u=rwx,g=rw,g+s,o=r "$scratchdir/dir" || test_skipped "Can't chmod"
chmod 664 "$scratchdir/file"
chmod 775 "$scratchdir/program"
[ -g "$scratchdir/dir" ] || test_skipped "The directory setgid bit vanished!"
......@@ -35,7 +35,7 @@ mkdir "$scratchdir/dir/blah"
# Test some target directories
testit setgid-off 700 rw------- rwx------ rwx------
testit setgid-on 2700 rw------- rwx------ rwx--S---
testit setgid-on u=rwx,g=rw,g+s,o-rwx rw------- rwx------ rwx--S---
# Hooray
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment