3 # Run a backup of the Bacula build directory with some acls
6 # The fs have to be mount with the acl option (mount -o remount,acl,user_xattr /tmp)
7 # on ubuntu, it needs the attr package
9 TestName="backup-acl-test"
18 # Zap out any schedule in default conf file so that
19 # it doesn't start during our test
22 echo "s% Schedule =%# Schedule =%g" > $outf
23 echo "s/Options {/Options { aclsupport=yes/" >> $outf
24 cp ${cwd}/bin/bacula-dir.conf $cwd/tmp/1
25 sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf
33 cp ${cwd}/bin/bconsole $d
34 setfacl -m d:user:$uid:r-x $d/testdir
35 setfacl -m d:user:root:-wx $d/testdir
36 setfacl -m user:nobody:--- $d/testdir
37 setfacl -m user:nobody:--- $d/bconsole
38 setfacl -m group:nogroup:--x $d/bconsole
39 cp ${cwd}/bin/bconsole $d/testdir
40 cp ${cwd}/bin/bconsole $d/other
41 #setfattr -n bacula -v rulez $d/other
43 (cd $cwd/build; getfacl -R acl > $cwd/tmp/org)
45 change_jobname Client1 $JobName
48 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
51 @$out ${cwd}/tmp/log1.out
52 label volume=TestVolume001 storage=File pool=Default
59 @$out ${cwd}/tmp/log2.out
60 restore where=${cwd}/tmp/bacula-restores select all done
69 check_for_zombie_jobs storage=File
72 (cd $cwd/tmp/bacula-restores/$cwd/build; getfacl -R acl > $cwd/tmp/new)
74 diff $cwd/tmp/org $cwd/tmp/new