mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
test:bb/samba-tool ntacl: let return acl flag lack hex padding
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
16d2687cc7
commit
75a089dc46
@ -111,7 +111,3 @@
|
|||||||
^samba.tests.samba_tool.ntacl.samba.tests.samba_tool.ntacl.NtACLCmdSysvolTestCase.test_with_missing_files.ad_dc:local
|
^samba.tests.samba_tool.ntacl.samba.tests.samba_tool.ntacl.NtACLCmdSysvolTestCase.test_with_missing_files.ad_dc:local
|
||||||
^samba3.blackbox.large_acl.NT1.able.to.retrieve.a.large.ACL.if.VFS.supports.it.fileserver_smb1_done
|
^samba3.blackbox.large_acl.NT1.able.to.retrieve.a.large.ACL.if.VFS.supports.it.fileserver_smb1_done
|
||||||
^samba3.blackbox.large_acl.SMB3.able.to.retrieve.a.large.ACL.if.VFS.supports.it.fileserver
|
^samba3.blackbox.large_acl.SMB3.able.to.retrieve.a.large.ACL.if.VFS.supports.it.fileserver
|
||||||
^samba4.blackbox.samba-tool_ntacl.ad_member:local..changedomsid.ad_member:local
|
|
||||||
^samba4.blackbox.samba-tool_ntacl.ad_member:local..changedomsid_ntvfs.ad_member:local
|
|
||||||
^samba4.blackbox.samba-tool_ntacl.ad_member:local..get_ntacl.ad_member:local
|
|
||||||
^samba4.blackbox.samba-tool_ntacl.ad_member:local..get_ntacl_ntvfs.ad_member:local
|
|
||||||
|
@ -19,7 +19,12 @@ testfile="$PREFIX/ntacl_testfile"
|
|||||||
|
|
||||||
# acl from samba_tool/ntacl.py tests
|
# 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)"
|
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)"
|
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"
|
new_domain_sid="S-1-5-21-2212615479-2695158682-2101375468"
|
||||||
|
|
||||||
. $(dirname $0)/subunit.sh
|
. $(dirname $0)/subunit.sh
|
||||||
@ -78,7 +83,7 @@ test_changedomsid()
|
|||||||
--service=tmp \
|
--service=tmp \
|
||||||
--configfile=$PREFIX/ad_member/lib/server.conf) || return $?
|
--configfile=$PREFIX/ad_member/lib/server.conf) || return $?
|
||||||
|
|
||||||
test "$retacl" = "$new_acl"
|
test "$retacl" = "$new_acl_without_padding"
|
||||||
}
|
}
|
||||||
|
|
||||||
test_changedomsid_ntvfs()
|
test_changedomsid_ntvfs()
|
||||||
@ -97,8 +102,7 @@ test_changedomsid_ntvfs()
|
|||||||
--xattr-backend=tdb \
|
--xattr-backend=tdb \
|
||||||
--use-ntvfs \
|
--use-ntvfs \
|
||||||
--configfile=$PREFIX/ad_member/lib/server.conf) || return $?
|
--configfile=$PREFIX/ad_member/lib/server.conf) || return $?
|
||||||
|
test "$retacl" = "$new_acl_without_padding"
|
||||||
test "$retacl" = "$new_acl"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# work around include error - s4-loadparm does not allow missing include files
|
# 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 "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 "changedomsid" test_changedomsid "$testfile" || failed=$(expr $failed + 1)
|
||||||
|
|
||||||
testit "set_ntacl_ntvfs" test_set_acl_ntvfs "$testfile" "$acl" || 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)
|
testit "changedomsid_ntvfs" test_changedomsid_ntvfs "$testfile" || failed=$(expr $failed + 1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user