]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4/selftest: adjust samba.blackbox.pdbtest to use (s3) smbclient
authorNoel Power <noel.power@suse.com>
Mon, 9 Dec 2019 19:40:09 +0000 (19:40 +0000)
committerRalph Boehme <slow@samba.org>
Fri, 3 Apr 2020 15:08:28 +0000 (15:08 +0000)
smbclient4 only negotiates smb1, this test should use smbclient(s3)
instead.

Signed-off-by: Noel Power <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
selftest/skip_smb1_fails
source4/selftest/tests.py
testprogs/blackbox/test_pdbtest.sh

index 60d9cd71b18c3bc8f9eceba9b3f01e3f7d28fcb5..e669d3b44b297fa6c5a6040529226248c0a34260 100644 (file)
 ^samba4.smb.signing disabled on with -k yes --signing=off domain-creds\(ad_member\)
 ^samba4.smb.spnego.krb5.no_optimistic\(ad_dc\)
 ^samba4.smb.spnego.ntlmssp.no_optimistic\(ad_dc\)
-^samba.blackbox.pdbtest\(ad_dc_default\)\(ad_dc_default:local\)
-^samba.blackbox.pdbtest\(nt4_dc\)\(nt4_dc:local\)
 ^samba.tests.auth_log\(ad_dc:local\)
 ^samba.tests.auth_log_pass_change\(ad_dc\)
 ^samba.tests.libsmb\(nt4_dc\)
index 0ac6d8a7d899d2cab722a6d44f9f2115f09184ea..406702811827e4ac74e3a06661b10c9e4013bf4a 100755 (executable)
@@ -272,7 +272,7 @@ for env in ["ad_dc_default", "nt4_dc"]:
         "-k no --option=clientusespnego=no"]:
         name = "rpc.lsa.secrets on %s with with %s" % (transport, ntlmoptions)
         plansmbtorture4testsuite('rpc.lsa.secrets', env, ["%s:$SERVER[]" % (transport), ntlmoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.%s" % name)
-    plantestsuite("samba.blackbox.pdbtest(%s)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest", smbclient4, '$SMB_CONF_PATH', configuration])
+    plantestsuite("samba.blackbox.pdbtest(%s)" % env, "%s:local" % env, [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", "pdbtest", smbclient3, '$SMB_CONF_PATH', configuration])
 
 gpo = smbtorture4_testsuites("gpo.")
 for t in gpo:
index d5c37f0acc95e5cbf5b30c05b4043d333a419dee..95e3493c7e74fe6ed3bcb0769b8774af47aea3c7 100755 (executable)
@@ -73,11 +73,11 @@ EOF
 testit "create user with pdbedit" $texpect ./tmpsmbpasswdscript $VALGRIND $pdbedit -s $SMB_CONF -a $USER --account-desc="pdbedit-test-user" $@ || failed=`expr $failed + 1`
 USERPASS=$NEWUSERPASS
 
-test_smbclient "Test login with user (ntlm)" 'ls' "$unc" -k no -U$USER%$NEWUSERPASS $@ || failed=`expr $failed + 1`
+test_smbclient "Test login with user (ntlm)" 'ls' "$unc"  -U$USER%$NEWUSERPASS $@ || failed=`expr $failed + 1`
 
 testit "modify user"  $VALGRIND $pdbedit -s $SMB_CONF --modify $USER --drive="D:" $@ || failed=`expr $failed + 1`
 
-test_smbclient "Test login with user (ntlm)" 'ls' "$unc" -k no -U$USER%$NEWUSERPASS $@|| failed=`expr $failed + 1`
+test_smbclient "Test login with user (ntlm)" 'ls' "$unc"  -U$USER%$NEWUSERPASS $@|| failed=`expr $failed + 1`
 
 NEWUSERPASS=testPaSS@02%
 
@@ -87,30 +87,30 @@ testit "set user password with smbpasswd" \
 
 USERPASS=$NEWUSERPASS
 
-test_smbclient "Test login with user (ntlm)" 'ls' "$unc" -k no -U$USER%$NEWUSERPASS $@|| failed=`expr $failed + 1`
+test_smbclient "Test login with user (ntlm)" 'ls' "$unc"  -U$USER%$NEWUSERPASS $@|| failed=`expr $failed + 1`
 
 testit "modify user - disabled"  $VALGRIND $net sam set disabled $USER yes $@ || failed=`expr $failed + 1`
 
-testit_expect_failure  "Test login with disabled suer" $VALGRIND $smbclient //$SERVER/tmp -c 'ls' -k no -U$USER@%$USERPASS && failed=`expr $failed + 1`
+testit_expect_failure  "Test login with disabled suer" $VALGRIND $smbclient //$SERVER/tmp -c 'ls' -U$USER@%$USERPASS && failed=`expr $failed + 1`
 
 testit "modify user - enabled"  $VALGRIND $net sam set disabled $USER no $@ || failed=`expr $failed + 1`
 
-test_smbclient "Test login with re-enabled user (ntlm)" 'ls' "$unc" -k no -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
+test_smbclient "Test login with re-enabled user (ntlm)" 'ls' "$unc"  -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
 
 testit "modify user - must change password now"  $VALGRIND $net sam set pwdmustchangenow $USER yes $@ || failed=`expr $failed + 1`
 
-testit_expect_failure  "Test login with expired password" $VALGRIND $smbclient //$SERVER/tmp -c 'ls' -k no -U$USER@%$USERPASS && failed=`expr $failed + 1`
+testit_expect_failure  "Test login with expired password" $VALGRIND $smbclient //$SERVER/tmp -c 'ls' -U$USER@%$USERPASS && failed=`expr $failed + 1`
 
 testit "modify user - disable password expiry"  $VALGRIND $net sam set pwnoexp $USER yes $@ || failed=`expr $failed + 1`
 
-test_smbclient "Test login with no expiry (ntlm)" 'ls' "$unc" -k no -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
+test_smbclient "Test login with no expiry (ntlm)" 'ls' "$unc" -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
 
 NEWUSERPASS=testPaSS@03%
 NEWUSERHASH=062519096c45739c1938800f80906731
 
 testit "Set user password with password hash" $VALGRIND $pdbedit -s $SMB_CONF -u $USER --set-nt-hash $NEWUSERHASH $@ || failed=`expr $failed + 1`
 
-test_smbclient "Test login with new password (from hash)" 'ls' "$unc" -k no -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
+test_smbclient "Test login with new password (from hash)" 'ls' "$unc"  -U$USER%$NEWUSERPASS || failed=`expr $failed + 1`
 
 testit "del user"  $VALGRIND $pdbedit -s $SMB_CONF -x $USER $@ || failed=`expr $failed + 1`