mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
test out the -r option to chacl.
This commit is contained in:
@@ -297,10 +297,32 @@ chacl -l file1 | _acl_filter_id
|
||||
chacl -l acldir | _acl_filter_id
|
||||
chacl -l acldir/file2 | _acl_filter_id
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
echo ""
|
||||
echo "=== Recursive change ACL ==="
|
||||
rm -fr root
|
||||
mkdir root
|
||||
pushd root
|
||||
# create an arbitrary little tree
|
||||
for i in 1 2 3 4 5 6 7 8 9 0
|
||||
do
|
||||
mkdir -p a/$i
|
||||
mkdir -p b/c$i/$i
|
||||
touch a/$i/mumble
|
||||
done
|
||||
popd
|
||||
chown -R 12345.54321 root
|
||||
echo "Change #1..."
|
||||
$runas -u 12345 -g 54321 -- /bin/chacl -r u::rwx,g::-w-,o::--x root
|
||||
find root -print | xargs chacl -l
|
||||
echo "Change #2..."
|
||||
$runas -u 12345 -g 54321 -- /bin/chacl -r u::---,g::---,o::--- root
|
||||
find root -print | xargs chacl -l
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
|
||||
@@ -104,3 +104,96 @@ Remove ACLs...
|
||||
file1 []
|
||||
acldir []
|
||||
acldir/file2 []
|
||||
|
||||
=== Recursive change ACL ===
|
||||
/mnt/test/051.dir1/root /mnt/test/051.dir1
|
||||
/mnt/test/051.dir1/root
|
||||
/mnt/test/051.dir1
|
||||
Change #1...
|
||||
root [u::rwx,g::-w-,o::--x]
|
||||
root/a [u::rwx,g::-w-,o::--x]
|
||||
root/a/1 [u::rwx,g::-w-,o::--x]
|
||||
root/a/1/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/2 [u::rwx,g::-w-,o::--x]
|
||||
root/a/2/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/3 [u::rwx,g::-w-,o::--x]
|
||||
root/a/3/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/4 [u::rwx,g::-w-,o::--x]
|
||||
root/a/4/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/5 [u::rwx,g::-w-,o::--x]
|
||||
root/a/5/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/6 [u::rwx,g::-w-,o::--x]
|
||||
root/a/6/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/7 [u::rwx,g::-w-,o::--x]
|
||||
root/a/7/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/8 [u::rwx,g::-w-,o::--x]
|
||||
root/a/8/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/9 [u::rwx,g::-w-,o::--x]
|
||||
root/a/9/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/a/0 [u::rwx,g::-w-,o::--x]
|
||||
root/a/0/mumble [u::rwx,g::-w-,o::--x]
|
||||
root/b [u::rwx,g::-w-,o::--x]
|
||||
root/b/c1 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c1/1 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c2 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c2/2 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c3 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c3/3 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c4 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c4/4 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c5 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c5/5 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c6 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c6/6 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c7 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c7/7 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c8 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c8/8 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c9 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c9/9 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c0 [u::rwx,g::-w-,o::--x]
|
||||
root/b/c0/0 [u::rwx,g::-w-,o::--x]
|
||||
Change #2...
|
||||
root [u::---,g::---,o::---]
|
||||
root/a [u::---,g::---,o::---]
|
||||
root/a/1 [u::---,g::---,o::---]
|
||||
root/a/1/mumble [u::---,g::---,o::---]
|
||||
root/a/2 [u::---,g::---,o::---]
|
||||
root/a/2/mumble [u::---,g::---,o::---]
|
||||
root/a/3 [u::---,g::---,o::---]
|
||||
root/a/3/mumble [u::---,g::---,o::---]
|
||||
root/a/4 [u::---,g::---,o::---]
|
||||
root/a/4/mumble [u::---,g::---,o::---]
|
||||
root/a/5 [u::---,g::---,o::---]
|
||||
root/a/5/mumble [u::---,g::---,o::---]
|
||||
root/a/6 [u::---,g::---,o::---]
|
||||
root/a/6/mumble [u::---,g::---,o::---]
|
||||
root/a/7 [u::---,g::---,o::---]
|
||||
root/a/7/mumble [u::---,g::---,o::---]
|
||||
root/a/8 [u::---,g::---,o::---]
|
||||
root/a/8/mumble [u::---,g::---,o::---]
|
||||
root/a/9 [u::---,g::---,o::---]
|
||||
root/a/9/mumble [u::---,g::---,o::---]
|
||||
root/a/0 [u::---,g::---,o::---]
|
||||
root/a/0/mumble [u::---,g::---,o::---]
|
||||
root/b [u::---,g::---,o::---]
|
||||
root/b/c1 [u::---,g::---,o::---]
|
||||
root/b/c1/1 [u::---,g::---,o::---]
|
||||
root/b/c2 [u::---,g::---,o::---]
|
||||
root/b/c2/2 [u::---,g::---,o::---]
|
||||
root/b/c3 [u::---,g::---,o::---]
|
||||
root/b/c3/3 [u::---,g::---,o::---]
|
||||
root/b/c4 [u::---,g::---,o::---]
|
||||
root/b/c4/4 [u::---,g::---,o::---]
|
||||
root/b/c5 [u::---,g::---,o::---]
|
||||
root/b/c5/5 [u::---,g::---,o::---]
|
||||
root/b/c6 [u::---,g::---,o::---]
|
||||
root/b/c6/6 [u::---,g::---,o::---]
|
||||
root/b/c7 [u::---,g::---,o::---]
|
||||
root/b/c7/7 [u::---,g::---,o::---]
|
||||
root/b/c8 [u::---,g::---,o::---]
|
||||
root/b/c8/8 [u::---,g::---,o::---]
|
||||
root/b/c9 [u::---,g::---,o::---]
|
||||
root/b/c9/9 [u::---,g::---,o::---]
|
||||
root/b/c0 [u::---,g::---,o::---]
|
||||
root/b/c0/0 [u::---,g::---,o::---]
|
||||
|
||||
Reference in New Issue
Block a user