From: Marco van Wieringen Date: Sat, 5 Sep 2009 20:17:19 +0000 (+0200) Subject: Add acl script code for Mac X-Git-Tag: Release-7.0.0~2635^2~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4fdb60cf88523b9f78f9406159194cc13f7e554c;p=bacula%2Fbacula Add acl script code for Mac --- diff --git a/regress/tests/acl-xattr-test b/regress/tests/acl-xattr-test index 6e1c89f122..e1e827cab9 100755 --- a/regress/tests/acl-xattr-test +++ b/regress/tests/acl-xattr-test @@ -50,19 +50,40 @@ rm -rf $d mkdir $d mkdir $d/testdir cp ${cwd}/bin/bconsole $d -setfacl -m d:user:$uid:r-x $d/testdir -setfacl -m d:user:root:-wx $d/testdir -setfacl -m user:nobody:--- $d/testdir -setfacl -m user:nobody:--- $d/bconsole -setfacl -m group:nogroup:--x $d/bconsole -cp ${cwd}/bin/bconsole $d/testdir -cp ${cwd}/bin/bconsole $d/other -attr -s bacula.test -V rulez $d/other 2>/dev/null 1>/dev/null - -( cd $cwd/build - getfacl -R acl > $cwd/tmp/org - attr -g bacula.test $d/other > $cwd/tmp/attr.org -) + +case `uname -s` in + Linux) + setfacl -m d:user:$uid:r-x $d/testdir + setfacl -m d:user:root:-wx $d/testdir + setfacl -m user:nobody:--- $d/testdir + setfacl -m user:nobody:--- $d/bconsole + setfacl -m group:nogroup:--x $d/bconsole + cp ${cwd}/bin/bconsole $d/testdir + cp ${cwd}/bin/bconsole $d/other + attr -s bacula.test -V rulez $d/other 2>/dev/null 1>/dev/null + + ( cd $cwd/build + getfacl -R acl > $cwd/tmp/org + attr -g bacula.test $d/other > $cwd/tmp/attr.org + ) + ;; + Darwin) + chmod +a "user:$uid allow read execute" $d/testdir + chmod +a "user:root allow write execute" $d/testdir + chmod +a "user:nobody deny read write execute" $d/testdir + chmod +a "user:nobody deny read write execute" $d/bconsole + chmod +a "group:nogroup allow execute" $d/bconsole + cp ${cwd}/bin/bconsole $d/testdir + cp ${cwd}/bin/bconsole $d/other + xattr -w bacula.test "rulez" $d/other 2>/dev/null 1>/dev/null + + ( cd $cwd/build + ls -lde -R acl > $cwd/tmp/org + xattr -p bacula.test $d/other > $cwd/tmp/attr.org + ) + ;; +esac + change_jobname BackupClient1 $JobName start_test