1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

testprogs/blackbox: move 'ntacl get' out of test_changedomsid() in test_samba-tool_ntacl.sh

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2023-05-17 11:26:48 +02:00 committed by Andrew Bartlett
parent 619f097b7d
commit 11741791cc

View File

@ -32,8 +32,9 @@ test_get_acl()
{
testfile="$1"
exptextedacl="$2"
shift 2
retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl) || return $?
retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl "$@") || return $?
test "$retacl" = "$exptextedacl"
}
@ -67,19 +68,12 @@ test_set_acl_ntvfs()
test_changedomsid()
{
testfile="$1"
shift 1
$PYTHON $samba_tool ntacl changedomsid \
"$domain_sid" "$new_domain_sid" "$testfile" \
--service=tmp \
$CONFIGURATION
retacl=$($PYTHON $samba_tool ntacl get \
"$testfile" \
--as-sddl \
--service=tmp \
$CONFIGURATION) || return $?
test "$retacl" = "$new_acl_without_padding"
$CONFIGURATION "$@"
}
test_changedomsid_ntvfs()
@ -121,6 +115,11 @@ testit "set_ntacl" test_set_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 "get_ntacl_after_changedomsid" \
test_get_acl "$testfile" "$new_acl_without_padding" \
--service=tmp \
$CONFIGURATION \
|| 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_without_padding" || \