]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Testsuite/dir-sgid: use symbolic mode to set sgid bit
authorBen Walton <bwalton@artsci.utoronto.ca>
Wed, 21 Sep 2011 02:57:39 +0000 (22:57 -0400)
committerWayne Davison <wayned@samba.org>
Thu, 22 Sep 2011 15:28:07 +0000 (08:28 -0700)
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.

testsuite/dir-sgid.test

index bbd86a61bb1357dc67746ff5954809b1bb323312..44cd61e7ebbe3ffb30aeeb6b12122b5497c3c1af 100644 (file)
@@ -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