1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source4
Stefan Metzmacher 5ad618bc67 s4:torture/smb2: add smb2.multichannel.oplocks.test3{_windows,specification}
This is similar to the smb2.multichannel.leases.test5,
but it tests the oplock case instead of leases.

With Oplocks Windows only sends a single break on the latest channel,
this is not what the spec says...

Maybe we should have a similar test that would expect the
behavior from the [MS-SMB2] (3/4/2020 rev 60.0)
"3.3.4.6 Object Store Indicates an Oplock Break":

  ...

  If the server implements the SMB 3.x dialect family, SMB2 Oplock Break
  Notification MUST be sent to the client using the first available
  connection in Open.Session.ChannelList where Channel.Connection is not
  NULL. If the server fails to send the notification to the client, the
  server MUST retry the send using an alternate connection, if available,
  in Open.Session.ChannelList.
  ...

Here I add one test that demonstrates the Windows behavior:
 smb2.multichannel.oplocks.test3_windows
and a 2nd test that demonstrates the behavior from MS-SMB2.
 smb2.multichannel.oplocks.test3_specification

Note that Windows 10 seems to behave differently and it's not
possible to open all 32 channel used by this test.

Against remote servers it's required to run iptables as root:

 #> smbtorture //server/torture -Uu%p \
    --option="torture:use_iptables=yes" \
    --option="torture:iptables_command=sudo /sbin/iptables" \
    smb2.multichannel.oplocks.test3_windows

 #> smbtorture //server/torture -Uu%p \
    --option="torture:use_iptables=yes" \
    --option="torture:iptables_command=sudo /sbin/iptables" \
    smb2.multichannel.oplocks.test3_specification

The test will also work against a Samba server
with 'smbd:FSCTL_SMBTORTURE = yes', and won't require iptables
in that case.

Samba will get a "smb2 disable oplock break retry" configuration
option to switch between both behaviors, as it's much more common with Samba
that leases are not supported and clients will fallback to
oplocks together with multichannel.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2020-07-08 15:54:39 +00:00
..
auth pyauth: add python binding for auth_session_info_set_unix() 2020-06-05 10:32:31 +00:00
build/pasn1
cldap_server source4 smdb: Add a post fork hook to the service API 2018-11-01 23:49:24 +01:00
client Fix clang 9 missing-field-initializer warnings 2020-05-08 09:31:31 +00:00
cluster dbwrap: Remove calls to loadparm 2018-04-24 01:53:19 +02:00
dns_server s4/rpc_server/dnsserver: Allow parsing of dnsProperty to fail gracefully 2020-05-15 07:29:16 +00:00
dsdb dsdb/password_hash: don't double assign variables (CID 1363048, 1034720) 2020-07-06 13:56:17 +00:00
echo_server s4 echo_server: Enable prefork process model 2019-07-16 08:13:12 +00:00
heimdal heimdal: apply disallow-forwardable on server in TGS request 2020-06-12 20:42:38 +00:00
heimdal_build heimdal_build: Remove bashism from --address-sanitizer build rule 2020-01-18 12:25:16 +00:00
include lib: Remove global xfile.h includes 2016-11-20 06:23:19 +01:00
kdc db-glue.c: set forwardable flag on cross-realm tgt tickets 2020-06-12 22:10:34 +00:00
ldap_server s4 ldap_server: modernize debug calls 2020-05-06 21:15:42 +00:00
lib policy/gp: always close a file (CID 1445119) 2020-07-06 12:30:33 +00:00
libcli s4:libcli/smb2: add const to struct smbcli_options *options for smb2_connect() 2020-07-08 15:54:38 +00:00
libnet smbdes: convert E_old_pw_hash to use gnutls 2019-12-10 00:30:31 +00:00
librpc Fix clang 9 missing-field-initializer warnings 2020-05-08 09:31:31 +00:00
nbt_server smbdotconf: mark "wins hook" with substitution="1" 2019-11-27 10:25:36 +00:00
ntp_signd lib/crypto: move gnutls error wrapper to own subsystem 2019-06-27 12:54:22 +00:00
ntvfs ntvfs: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR 2020-06-22 12:07:38 +00:00
param s4:param: use struct initializer in lpcfg_smbcli_session_options() 2020-07-08 15:54:38 +00:00
rpc_server s4:rpc_server: Implement epmapper LookupHandleFree 2020-07-07 13:43:14 +00:00
script PY3: change shebang to python3 in source4/dsdb dir 2018-12-14 14:40:20 +01:00
scripting gpo: Run Group Policy Scripts 2020-06-23 16:32:30 +00:00
selftest selftest: run smbcacls test against a share with a DFS link 2020-07-07 21:40:33 +00:00
setup provision: Remove final code for the LDAP backend 2020-04-23 06:12:20 +00:00
smb_server source4/smb_server: Use NT_STATUS_PENDING instead of STATUS_PENDING 2020-06-22 12:07:38 +00:00
smbd lib/messaging: Move messages_dgm out of source3 2020-05-06 00:06:40 +00:00
torture s4:torture/smb2: add smb2.multichannel.oplocks.test3{_windows,specification} 2020-07-08 15:54:39 +00:00
utils Fix clang 9 missing-field-initializer warnings 2020-05-08 09:31:31 +00:00
winbind s4/winbind/idmap: check the right variable (CID 1272950) 2020-07-06 12:30:33 +00:00
wrepl_server source4 smdb: Add a post fork hook to the service API 2018-11-01 23:49:24 +01:00
.clang_complete
.valgrind_suppressions
wscript_build