From: Stefan Metzmacher Date: Wed, 17 May 2023 09:26:48 +0000 (+0200) Subject: testprogs/blackbox: move 'ntacl get' out of test_changedomsid() in test_samba-tool_nt... X-Git-Tag: talloc-2.4.1~287 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=11741791cc6ae339efd71b122ea9313b710bf1ac;p=thirdparty%2Fsamba.git testprogs/blackbox: move 'ntacl get' out of test_changedomsid() in test_samba-tool_ntacl.sh Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/testprogs/blackbox/test_samba-tool_ntacl.sh b/testprogs/blackbox/test_samba-tool_ntacl.sh index b6ce4efe4cf..769b2cebd69 100755 --- a/testprogs/blackbox/test_samba-tool_ntacl.sh +++ b/testprogs/blackbox/test_samba-tool_ntacl.sh @@ -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" || \