summaryrefslogtreecommitdiff
path: root/testprogs/blackbox/test_samba-tool_ntacl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs/blackbox/test_samba-tool_ntacl.sh')
-rwxr-xr-xtestprogs/blackbox/test_samba-tool_ntacl.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/testprogs/blackbox/test_samba-tool_ntacl.sh b/testprogs/blackbox/test_samba-tool_ntacl.sh
index f8f0b5b6d24..813edd71e4c 100755
--- a/testprogs/blackbox/test_samba-tool_ntacl.sh
+++ b/testprogs/blackbox/test_samba-tool_ntacl.sh
@@ -19,7 +19,12 @@ testfile="$PREFIX/ntacl_testfile"
# acl from samba_tool/ntacl.py tests
acl="O:DAG:DUD:P(A;OICI;0x001f01ff;;;DA)(A;OICI;0x001f01ff;;;EA)(A;OICIIO;0x001f01ff;;;CO)(A;OICI;0x001f01ff;;;DA)(A;OICI;0x001f01ff;;;SY)(A;OICI;0x001200a9;;;AU)(A;OICI;0x001200a9;;;ED)S:AI(OU;CIIDSA;WP;f30e3bbe-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)(OU;CIIDSA;WP;f30e3bbf-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)"
+
new_acl="O:S-1-5-21-2212615479-2695158682-2101375468-512G:S-1-5-21-2212615479-2695158682-2101375468-513D:P(A;OICI;0x001f01ff;;;S-1-5-21-2212615479-2695158682-2101375468-512)(A;OICI;0x001f01ff;;;S-1-5-21-2212615479-2695158682-2101375468-519)(A;OICIIO;0x001f01ff;;;CO)(A;OICI;0x001f01ff;;;S-1-5-21-2212615479-2695158682-2101375468-512)(A;OICI;0x001f01ff;;;SY)(A;OICI;0x001200a9;;;AU)(A;OICI;0x001200a9;;;ED)S:AI(OU;CIIDSA;WP;f30e3bbe-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)(OU;CIIDSA;WP;f30e3bbf-9ff0-11d1-b603-0000f80367c1;bf967aa5-0de6-11d0-a285-00aa003049e2;WD)"
+
+acl_without_padding=$(echo -n "$acl" | perl -p -e 's/0x00/0x/g')
+new_acl_without_padding=$(echo -n "$new_acl" | perl -p -e 's/0x00/0x/g')
+
new_domain_sid="S-1-5-21-2212615479-2695158682-2101375468"
. $(dirname $0)/subunit.sh
@@ -78,7 +83,7 @@ test_changedomsid()
--service=tmp \
--configfile=$PREFIX/ad_member/lib/server.conf) || return $?
- test "$retacl" = "$new_acl"
+ test "$retacl" = "$new_acl_without_padding"
}
test_changedomsid_ntvfs()
@@ -97,8 +102,7 @@ test_changedomsid_ntvfs()
--xattr-backend=tdb \
--use-ntvfs \
--configfile=$PREFIX/ad_member/lib/server.conf) || return $?
-
- test "$retacl" = "$new_acl"
+ test "$retacl" = "$new_acl_without_padding"
}
# work around include error - s4-loadparm does not allow missing include files
@@ -118,12 +122,13 @@ touch "$testfile"
testit "set_ntacl" test_set_acl "$testfile" "$acl" || failed=$(expr $failed + 1)
-testit "get_ntacl" test_get_acl "$testfile" "$acl" || failed=$(expr $failed + 1)
+testit "get_ntacl" test_get_acl "$testfile" "$acl_without_padding" || failed=$(expr $failed + 1)
testit "changedomsid" test_changedomsid "$testfile" || failed=$(expr $failed + 1)
testit "set_ntacl_ntvfs" test_set_acl_ntvfs "$testfile" "$acl" || failed=$(expr $failed + 1)
-testit "get_ntacl_ntvfs" test_get_acl_ntvfs "$testfile" "$acl" || failed=$(expr $failed + 1)
+testit "get_ntacl_ntvfs" test_get_acl_ntvfs "$testfile" "$acl_without_padding" || \
+ failed=$(expr $failed + 1)
testit "changedomsid_ntvfs" test_changedomsid_ntvfs "$testfile" || failed=$(expr $failed + 1)