uid=`id -u`
rm -rf $d
mkdir -p $d
-mkdir -p $d/testdir
+mkdir -p $d/acl-dir
cp ${cwd}/bin/bconsole $d
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 d:user:$uid:r-x $d/acl-dir
+ setfacl -m d:user:root:-wx $d/acl-dir
+ setfacl -m user:nobody:--- $d/acl-dir
setfacl -m user:nobody:--- $d/bconsole
setfacl -m group:nogroup:--x $d/bconsole
- cp ${cwd}/bin/bconsole $d/testdir
+ cp ${cwd}/bin/bconsole $d/acl-dir
cp ${cwd}/bin/bconsole $d/other
attr -s bacula.test -V rulez $d/other 2>/dev/null 1>/dev/null
)
;;
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:$uid allow read execute" $d/acl-dir
+ chmod +a "user:root allow write execute" $d/acl-dir
+ chmod +a "user:nobody deny read write execute" $d/acl-dir
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/acl-dir
cp ${cwd}/bin/bconsole $d/other
xattr -w bacula.test "rulez" $d/other 2>/dev/null 1>/dev/null
#
df -F zfs $d > /dev/null 2>&1
if [ $? = 0 ]; then
- chmod A+user:$uid:rx:allow $d/testdir
- chmod A+user:root:wx:allow $d/testdir
- chmod A+user:nobody:rwx:deny $d/testdir
+ chmod A+user:$uid:rx:allow $d/acl-dir
+ chmod A+user:root:wx:allow $d/acl-dir
+ chmod A+user:nobody:rwx:deny $d/acl-dir
chmod A+user:nobody:rwx:deny $d/bconsole
chmod A+group:nogroup:x:allow $d/bconsole
else
- chmod A+user:$uid:r-x $d/testdir
- chmod A+user:root:-wx $d/testdir
- chmod A+user:nobody:--- $d/testdir
+ chmod A+user:$uid:r-x $d/acl-dir
+ chmod A+user:root:-wx $d/acl-dir
+ chmod A+user:nobody:--- $d/acl-dir
chmod A+user:nobody:--- $d/bconsole
chmod A+group:nogroup:--x $d/bconsole
fi
change_jobname CompressedTest $JobName
start_test
-mkdir ${cwd}/build/src/testdir
-touch ${cwd}/build/src/testdir/.nobkp
-cp ${cwd}/build/src/dird/*.c ${cwd}/build/src/testdir
+mkdir ${cwd}/build/src/xxtestdir
+touch ${cwd}/build/src/xxtestdir/.nobkp
+cp ${cwd}/build/src/dird/*.c ${cwd}/build/src/xxtestdir
cat >tmp/bconcmds <<END_OF_DATA
@$out /dev/null
check_two_logs
-# should be ok if we remove the testdir
-rm -rf ${cwd}/build/src/testdir
+# should be ok if we remove the xxtestdir
+rm -rf ${cwd}/build/src/xxtestdir
check_restore_diff
-grep '/testdir' $tmp/log3.out > /dev/null
+grep '/xxtestdir' $tmp/log3.out > /dev/null
if [ $? = 0 ]; then
- print_debug "ERROR: Should not see testdir in estimate output"
+ print_debug "ERROR: Should not see xxtestdir in estimate output"
bstat=2
fi