1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

testprogs/blackbox: pass $CONFIGURATION to 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 16b9b508af
commit 619f097b7d
2 changed files with 10 additions and 9 deletions

View File

@ -826,7 +826,7 @@ plantestsuite("samba4.blackbox.client_etypes_all(ad_dc:client)", "ad_dc:client",
plantestsuite("samba4.blackbox.client_etypes_legacy(ad_dc:client)", "ad_dc:client", [os.path.join(bbdir, "test_client_etypes.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS', 'legacy', '23']) plantestsuite("samba4.blackbox.client_etypes_legacy(ad_dc:client)", "ad_dc:client", [os.path.join(bbdir, "test_client_etypes.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS', 'legacy', '23'])
plantestsuite("samba4.blackbox.client_etypes_strong(ad_dc:client)", "ad_dc:client", [os.path.join(bbdir, "test_client_etypes.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS', 'strong', '17_18']) plantestsuite("samba4.blackbox.client_etypes_strong(ad_dc:client)", "ad_dc:client", [os.path.join(bbdir, "test_client_etypes.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS', 'strong', '17_18'])
plantestsuite("samba4.blackbox.net_ads_dns(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_net_ads_dns.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$REALM', '$USERNAME', '$PASSWORD']) plantestsuite("samba4.blackbox.net_ads_dns(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_net_ads_dns.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$REALM', '$USERNAME', '$PASSWORD'])
plantestsuite("samba4.blackbox.samba-tool_ntacl(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_samba-tool_ntacl.sh"), '$PREFIX', '$DOMSID']) plantestsuite("samba4.blackbox.samba-tool_ntacl(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_samba-tool_ntacl.sh"), '$PREFIX', '$DOMSID', configuration])
env = "ad_member:local" env = "ad_member:local"
plantestsuite("samba4.blackbox.net_ads_search_server_P.primary", env, plantestsuite("samba4.blackbox.net_ads_search_server_P.primary", env,

View File

@ -2,13 +2,14 @@
# Blackbox tests for samba-tool ntacl get/set on member server # Blackbox tests for samba-tool ntacl get/set on member server
# Copyright (C) 2018 Björn Baumbach <bb@sernet.de> # Copyright (C) 2018 Björn Baumbach <bb@sernet.de>
if [ $# -ne 2 ]; then if [ $# -ne 3 ]; then
echo "Usage: test_samba-tool_ntacl.sh PREFIX DOMSID" echo "Usage: test_samba-tool_ntacl.sh PREFIX DOMSID CONFIGURATION"
exit 1 exit 1
fi fi
PREFIX=$1 PREFIX=$1
domain_sid=$2 domain_sid=$2
CONFIGURATION=$3
failed=0 failed=0
@ -50,7 +51,7 @@ test_get_acl_ntvfs()
testfile="$1" testfile="$1"
exptextedacl="$2" exptextedacl="$2"
retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl --use-ntvfs --xattr-backend=tdb --configfile=$PREFIX/ad_member/lib/server.conf) || return $? retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl --use-ntvfs --xattr-backend=tdb $CONFIGURATION) || return $?
test "$retacl" = "$exptextedacl" test "$retacl" = "$exptextedacl"
} }
@ -60,7 +61,7 @@ test_set_acl_ntvfs()
testfile="$1" testfile="$1"
acl="$2" acl="$2"
$PYTHON $samba_tool ntacl set "$acl" "$testfile" --use-ntvfs --xattr-backend=tdb --configfile=$PREFIX/ad_member/lib/server.conf $PYTHON $samba_tool ntacl set "$acl" "$testfile" --use-ntvfs --xattr-backend=tdb $CONFIGURATION
} }
test_changedomsid() test_changedomsid()
@ -70,13 +71,13 @@ test_changedomsid()
$PYTHON $samba_tool ntacl changedomsid \ $PYTHON $samba_tool ntacl changedomsid \
"$domain_sid" "$new_domain_sid" "$testfile" \ "$domain_sid" "$new_domain_sid" "$testfile" \
--service=tmp \ --service=tmp \
--configfile=$PREFIX/ad_member/lib/server.conf $CONFIGURATION
retacl=$($PYTHON $samba_tool ntacl get \ retacl=$($PYTHON $samba_tool ntacl get \
"$testfile" \ "$testfile" \
--as-sddl \ --as-sddl \
--service=tmp \ --service=tmp \
--configfile=$PREFIX/ad_member/lib/server.conf) || return $? $CONFIGURATION) || return $?
test "$retacl" = "$new_acl_without_padding" test "$retacl" = "$new_acl_without_padding"
} }
@ -89,14 +90,14 @@ test_changedomsid_ntvfs()
"$domain_sid" "$new_domain_sid" "$testfile" \ "$domain_sid" "$new_domain_sid" "$testfile" \
--use-ntvfs \ --use-ntvfs \
--xattr-backend=tdb \ --xattr-backend=tdb \
--configfile=$PREFIX/ad_member/lib/server.conf $CONFIGURATION
retacl=$($PYTHON $samba_tool ntacl get \ retacl=$($PYTHON $samba_tool ntacl get \
"$testfile" \ "$testfile" \
--as-sddl \ --as-sddl \
--xattr-backend=tdb \ --xattr-backend=tdb \
--use-ntvfs \ --use-ntvfs \
--configfile=$PREFIX/ad_member/lib/server.conf) || return $? $CONFIGURATION) || return $?
test "$retacl" = "$new_acl_without_padding" test "$retacl" = "$new_acl_without_padding"
} }