Skip to content

Commit c5710bb

Browse files
committed
testcases/smbtorture: update selftest files
Head of samba repo when this copy was made 062dc07e9b9 (s3-libnet: avoid using lp_dns_hostname() in join code, 2025-01-14) Signed-off-by: Sachin Prabhu <sp@spui.uk>
1 parent 5426d82 commit c5710bb

31 files changed

+130
-135
lines changed

testcases/smbtorture/selftest/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Scripts and modules copied over from the samba source tree.
22

33
At the time of copy, the samba head is at
4-
0caaa2d1723 (vfs: Remove shadow_copy2_get_real_filename_at(), 2024-01-11)
4+
062dc07e9b9 (s3-libnet: avoid using lp_dns_hostname() in join code, 2025-01-14)

testcases/smbtorture/selftest/expectedfail.d/encrypted_secrets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The fl2000dc environment is provisioned with the --plaintext-secrets option
2-
# running the ecnrypted secrets tests on it and expecting them to fail.
2+
# running the encrypted secrets tests on it and expecting them to fail.
33
# verifies that:
44
# * --plaintext-secrets option correctly provisions a domain
55
# * the dsdb operational module correctly handles unencrypted secrets
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This tests needs Password Settings Objects to work, so is expected to fail in this environment
2+
^samba.tests.krb5.as_req_tests.samba.tests.krb5.as_req_tests.AsReqKerberosTests.test_pw_expired\(fl2003dc\)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# These are supposed to fail as we want to verify the "tls verify peer"
2+
# restrictions. Note that fl2008r2dc uses a self-signed certificate
3+
# with does not have a crl file.
4+
#
5+
^samba4.ldb.simple.ldaps.*SERVER_NAME.*tlsverifypeer=ca_and_name_if_available\(
6+
^samba4.ldb.simple.ldaps.*SERVER_NAME.*tlsverifypeer=ca_and_name\(
7+
^samba4.ldb.simple.ldaps.*SERVER_NAME.*tlsverifypeer=as_strict_as_possible\(
8+
^samba4.ldb.simple.ldaps.*SERVER_IP.*tlsverifypeer=ca_and_name\(
9+
^samba4.ldb.simple.ldaps.*SERVER_IP.*tlsverifypeer=as_strict_as_possible\(
10+
^samba4.ldb.simple.ldaps.*SERVER.REALM.*tlsverifypeer=as_strict_as_possible.*fl2008r2dc

testcases/smbtorture/selftest/expectedfail.d/ntlm-auth

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@
1919
^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_last_only_requests\(ad_member\)
2020
^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_mix_requests\(ad_member\)
2121
^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_none_only_requests\(ad_member\)
22+
^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_schannel_invalid_alter_no_padding\(ad_member\)
23+
^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_schannel_invalid_alter_tail_padding\(ad_member\)
24+
^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_schannel_invalid_auth3_no_padding\(ad_member\)
25+
^samba.tests.dcerpc.raw_protocol.*.TestDCERPC_BIND.test_schannel_invalid_auth3_tail_padding\(ad_member\)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
## We assert all "ldap server require strong auth" combinations
3+
#
4+
^samba4.ldb.simple.ldap with SIMPLE-BIND.*ad_dc_ntvfs # ldap server require strong auth = allow_sasl_without_tls_channel_bindings
5+
^samba4.ldb.simple.ldap with SIMPLE-BIND.*fl2003dc # ldap server require strong auth = yes
6+
# fl2003dc has ldap server require strong auth = yes
7+
# and correct channel bindings are required for TLS
8+
^samba4.ldb.simple.ldaps.*SASL-BIND.*ldap_testing:tls_channel_bindings=no.*fl2003dc
9+
^samba4.ldb.simple.ldap.starttls.*SASL-BIND.*ldap_testing:tls_channel_bindings=no.*fl2003dc
10+
# ad_dc_ntvfs and fl2008r2dc have
11+
# ldap server require strong auth = allow_sasl_without_tls_channel_bindings
12+
# it means correct channel bindings are required, if the client indicated
13+
# explicit (even null) channel bindings are provided
14+
#
15+
# The following are in expectedfail_heimdal for now, as MIT
16+
# behaves differently:
17+
#^samba4.ldb.simple.ldaps.with.SASL-BIND.*use-kerberos=required.*ldap_testing:channel_bound=yes.*ldap_testing:tls_channel_bindings=no.*ad_dc_ntvfs
18+
#^samba4.ldb.simple.ldap.starttls.*SASL-BIND.*use-kerberos=required.*ldap_testing:channel_bound=yes.*ldap_testing:tls_channel_bindings=no.*ad_dc_ntvfs
19+
#^samba4.ldb.simple.ldaps.with.SASL-BIND.*use-kerberos=required.*ldap_testing:channel_bound=yes.*ldap_testing:tls_channel_bindings=no.*fl2008r2dc
20+
#^samba4.ldb.simple.ldap.starttls.*SASL-BIND.*use-kerberos=required.*ldap_testing:channel_bound=yes.*ldap_testing:tls_channel_bindings=no.*fl2008r2dc
21+
^samba4.ldb.simple.ldaps.with.SASL-BIND.*ldap_testing:channel_bound=yes.*ldap_testing:forced_channel_binding=wRoNg
22+
^samba4.ldb.simple.ldaps.with.SASL-BIND.*ldap_testing:channel_bound=no.*ldap_testing:forced_channel_binding=wRoNg
23+
^samba4.ldb.simple.ldap.starttls.*SASL-BIND.*ldap_testing:channel_bound=yes.*ldap_testing:forced_channel_binding=wRoNg
24+
^samba4.ldb.simple.ldap.starttls.*SASL-BIND.*ldap_testing:channel_bound=no.*ldap_testing:forced_channel_binding=wRoNg
25+
^samba4.ldb.simple.ldaps.with.SASL-BIND.*use-kerberos=disabled.*ldap_testing:channel_bound=yes.*ldap_testing:tls_channel_bindings=no.*ad_dc_ntvfs
26+
^samba4.ldb.simple.ldaps.with.SASL-BIND.*use-kerberos=disabled.*ldap_testing:channel_bound=yes.*ldap_testing:tls_channel_bindings=no.*fl2008r2dc
27+
^samba4.ldb.simple.ldap.starttls.*SASL-BIND.*use-kerberos=disabled.*ldap_testing:channel_bound=yes.*ldap_testing:tls_channel_bindings=no.*ad_dc_ntvfs
28+
^samba4.ldb.simple.ldap.starttls.*SASL-BIND.*use-kerberos=disabled.*ldap_testing:channel_bound=yes.*ldap_testing:tls_channel_bindings=no.*fl2008r2dc
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# We require seal and the test also runs differently against Windows 2022 with sign
2+
^samba4.rpc.backupkey.with.sign.backupkey.restore_guid\(ad_dc_default\)
3+
^samba4.rpc.backupkey.with.sign.backupkey.restore_guid.version.3\(ad_dc_default\)
4+
^samba4.rpc.backupkey.with.sign.backupkey.restore_guid_2nd\(ad_dc_default\)
5+
^samba4.rpc.backupkey.with.sign.backupkey.unable_to_decrypt_secret\(ad_dc_default\)
6+
^samba4.rpc.backupkey.with.sign.backupkey.wrong_user_restore_guid\(ad_dc_default\)
7+
^samba4.rpc.backupkey.with.sign.backupkey.wrong_version_restore_guid\(ad_dc_default\)
8+
^samba4.rpc.backupkey.with.sign.backupkey.bad_magic_on_secret_restore_guid\(ad_dc_default\)
9+
^samba4.rpc.backupkey.with.sign.backupkey.bad_hash_on_secret_restore_guid\(ad_dc_default\)
10+
^samba4.rpc.backupkey.with.sign.backupkey.bad_magic_on_accesscheck_restore_guid\(ad_dc_default\)
11+
^samba4.rpc.backupkey.with.sign.backupkey.bad_cert_guid_restore_guid\(ad_dc_default\)
12+
^samba4.rpc.backupkey.with.sign.backupkey.empty_request_restore_guid\(ad_dc_default\)
13+
^samba4.rpc.backupkey.with.sign.backupkey.retreive_backup_key_guid_validate\(ad_dc_default\)
14+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_encrypt_decrypt\(ad_dc_default\)
15+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_wrong_keyGUID\(ad_dc_default\)
16+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_empty_request\(ad_dc_default\)
17+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_short_request\(ad_dc_default\)
18+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_wrong_magic\(ad_dc_default\)
19+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_wrong_r2\(ad_dc_default\)
20+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_wrong_payload_length\(ad_dc_default\)
21+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_short_payload_length\(ad_dc_default\)
22+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_zero_payload_length\(ad_dc_default\)
23+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_wrong_ciphertext_length\(ad_dc_default\)
24+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_short_ciphertext_length\(ad_dc_default\)
25+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_decrypt_zero_ciphertext_length\(ad_dc_default\)
26+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_encrypt_decrypt_remote_key\(ad_dc_default\)
27+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_encrypt_decrypt_wrong_key\(ad_dc_default\)
28+
^samba4.rpc.backupkey.with.sign.backupkey.server_wrap_encrypt_decrypt_wrong_sid\(ad_dc_default\)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# fl2000dc and fl2003dc don't have 'server support krb5 netlogon = yes'
2+
^samba4.rpc.pac.on.ncacn_np.netr-bdc-krb5.verify-sig-krb5\(fl2000dc\)
3+
^samba4.rpc.pac.on.ncacn_np.netr-mem-krb5.verify-sig-krb5\(fl2000dc\)
4+
^samba4.rpc.pac.on.ncacn_np.netr-bdc-krb5.verify-sig-krb5\(fl2003dc\)
5+
^samba4.rpc.pac.on.ncacn_np.netr-mem-krb5.verify-sig-krb5\(fl2003dc\)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# gitlab runners with kernel 5.15.109+
2+
# allow setxattr() on security.NTACL
3+
#
4+
# It's not clear in detail why there's a difference
5+
# between various systems, one reason could be that
6+
# with selinux inode_owner_or_capable() is used to check
7+
# setxattr() permissions:
8+
# it checks for the fileowner too, as well as CAP_FOWNER.
9+
# Otherwise cap_inode_setxattr() is used, which checks for
10+
# CAP_SYS_ADMIN.
11+
#
12+
# But the kernel doesn't have selinux only apparmor...
13+
#
14+
# test_setntacl_forcenative expects
15+
# PermissionError: [Errno 1] Operation not permitted
16+
#
17+
# So for now we allow this to fail...
18+
^samba.tests.ntacls.samba.tests.ntacls.NtaclsTests.test_setntacl_forcenative.none

testcases/smbtorture/selftest/flapping.d/kcc_verify_py3

Lines changed: 0 additions & 2 deletions
This file was deleted.

testcases/smbtorture/selftest/flapping.d/samba_tool_visualize

Lines changed: 0 additions & 3 deletions
This file was deleted.

testcases/smbtorture/selftest/knownfail

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
^samba4.rpc.netlogon.*.DatabaseSync2
106106
^samba4.rpc.netlogon.*.NetrEnumerateTrustedDomains
107107
^samba4.rpc.netlogon.*.NetrEnumerateTrustedDomainsEx
108-
^samba4.rpc.netlogon.*.GetPassword
109108
^samba4.rpc.netlogon.*.DatabaseRedo
110109
^samba4.rpc.netlogon.*.netlogon.lsa_over_netlogon\(ad_dc\) #Broken by split of \\pipe\lsass from \\pipe\netlogon in the IDL
111110
^samba4.rpc.netlogon.*.netlogon.SetupCredentialsDowngrade\(ad_dc_ntvfs\) # Broken by allowing NT4 crypto on this environment
@@ -184,7 +183,6 @@
184183
^samba4.smb2.sharemode.sharemode-access
185184
^samba4.smb2.sharemode.access-sharemode
186185
^samba4.ntvfs.cifs.krb5.base.createx_access.createx_access\(.*\)$
187-
^samba4.rpc.lsa.forest.trust #Not fully provided by Samba4
188186
^samba4.blackbox.upgradeprovision.alpha13.ldapcmp_sd\(none\) # Due to something rewriting the NT ACL on DNS objects
189187
^samba4.blackbox.upgradeprovision.alpha13.ldapcmp_full_sd\(none\) # Due to something rewriting the NT ACL on DNS objects
190188
^samba4.blackbox.upgradeprovision.release-4-0-0.ldapcmp_sd\(none\) # Due to something rewriting the NT ACL on DNS objects
@@ -216,11 +214,7 @@
216214
^samba3.smb2.getinfo.fsinfo # quotas don't work yet
217215
^samba3.smb2.setinfo.setinfo
218216
^samba3.smb2.session.*reauth5 # some special anonymous checks?
219-
^samba3.smb2.compound.interim2 # wrong return code (STATUS_CANCELLED)
220-
^samba3.smb2.compound.aio.interim2 # wrong return code (STATUS_CANCELLED)
221217
^samba3.smb2.lock.*replay_broken_windows # This tests the windows behaviour
222-
^samba3.smb2.lease.statopen3
223-
^samba3.smb2.lease.unlink # we currently do not downgrade RH lease to R after unlink
224218
^samba4.smb2.ioctl.compress_notsup.*\(ad_dc_ntvfs\)
225219
^samba3.raw.session.*reauth2 # maybe fix this?
226220
^samba3.rpc.lsa.secrets.seal # This gives NT_STATUS_LOCAL_USER_SESSION_KEY
@@ -312,22 +306,6 @@
312306
#
313307
^samba4.ldap.sort.python.+UnicodeSortTests
314308
#
315-
## We assert all "ldap server require strong auth" combinations
316-
#
317-
^samba4.ldb.simple.ldap with SIMPLE-BIND.*ad_dc_ntvfs # ldap server require strong auth = allow_sasl_over_tls
318-
^samba4.ldb.simple.ldap with SIMPLE-BIND.*fl2003dc # ldap server require strong auth = yes
319-
^samba4.ldb.simple.ldaps with SASL-BIND.*fl2003dc # ldap server require strong auth = yes
320-
# These are supposed to fail as we want to verify the "tls verify peer"
321-
# restrictions. Note that fl2008r2dc uses a self-signed certificate
322-
# with does not have a crl file.
323-
#
324-
^samba4.ldb.simple.ldaps.*SERVER_NAME.*tlsverifypeer=ca_and_name_if_available\(
325-
^samba4.ldb.simple.ldaps.*SERVER_NAME.*tlsverifypeer=ca_and_name\(
326-
^samba4.ldb.simple.ldaps.*SERVER_NAME.*tlsverifypeer=as_strict_as_possible\(
327-
^samba4.ldb.simple.ldaps.*SERVER_IP.*tlsverifypeer=ca_and_name\(
328-
^samba4.ldb.simple.ldaps.*SERVER_IP.*tlsverifypeer=as_strict_as_possible\(
329-
^samba4.ldb.simple.ldaps.*SERVER.REALM.*tlsverifypeer=as_strict_as_possible.*fl2008r2dc
330-
#
331309
# we don't allow auth_level_connect anymore...
332310
#
333311
^samba3.blackbox.rpcclient.*ncacn_np.*with.*connect.*rpcclient # we don't allow auth_level_connect anymore
@@ -337,9 +315,9 @@
337315
^samba4.smb.signing.*disabled.*client-protection=off.*\(ad_dc\)
338316
# fl2000dc doesn't support AES
339317
^samba4.krb5.kdc.*as-req-aes.fl2000dc
340-
# nt4_member and ad_member don't support ntlmv1 (not even over SMB1)
341-
^samba3.blackbox.smbclient_auth.plain.*option=clientntlmv2auth=no.member.creds.*as.user.*_member
342-
^samba3.blackbox.smbclient_auth.plain.*option=clientntlmv2auth=no.*mNT1.member.creds.*as.user.*_member
318+
# ad_member don't support ntlmv1 (not even over SMB1)
319+
^samba3.blackbox.smbclient_auth.plain.*option=clientntlmv2auth=no.member.creds.*as.user.*ad_member
320+
^samba3.blackbox.smbclient_auth.plain.*option=clientntlmv2auth=no.*mNT1.member.creds.*as.user.*ad_member
343321
#nt-vfs server blocks read with execute access
344322
^samba4.smb2.read.access
345323
#ntvfs server blocks copychunk with execute access on read handle

testcases/smbtorture/selftest/knownfail.d/dns_packet

Whitespace-only changes.

testcases/smbtorture/selftest/knownfail.d/encrypted_secrets

Lines changed: 0 additions & 13 deletions
This file was deleted.

testcases/smbtorture/selftest/knownfail.d/getncchanges

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncIntegri
66
samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_multivalued_links\(promoted_dc\)
77
# Samba chooses to always increment the USN for the NC root at the point where it would otherwise show up.
88
samba4.drs.getncchanges.python\(.*\).getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_nc_is_first_nc_change_only\(
9+
10+
# test_repl_get_tgt_multivalued_links also fails with DrsReplicaSyncFakeAzureAdTests on promoted_dc
11+
samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncFakeAzureAdTests.test_repl_get_tgt_multivalued_links\(promoted_dc\)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# The unencrypted simple bind fails because the ad_dc environment sets ‘ldap
2+
# server require strong auth = yes’.
3+
^samba\.tests\.krb5\.gmsa_tests\.samba\.tests\.krb5\.gmsa_tests\.GmsaTests\.test_retrieving_password_after_unencrypted_simple_bind\(ad_dc:local\)$

0 commit comments

Comments
 (0)