s4:torture/smb2: add smb2.replay.dhv2-pending* tests
authorStefan Metzmacher <metze@samba.org>
Fri, 12 Mar 2021 16:21:47 +0000 (17:21 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 29 Mar 2021 19:36:37 +0000 (19:36 +0000)
commitf5168a21abd029fd57edfd270b86512312c801b1
treeee5e424512ede21c3555a082920e4dc877740c17
parentae1c3a0d9ae00471cbbc8a7787f026b87e76aa45
s4:torture/smb2: add smb2.replay.dhv2-pending* tests

These demonstrate that the replay detection for pending opens
either doesn't exist (for the share_access=NONE => SHARING_VIOLATION
case) or return the wrong status code => ACCESS_DENIED instead of
FILE_NOT_AVAILABLE.

Windows clients transparently retry after FILE_NOT_AVAILABLE,
while they pass ACCESS_DENIED directly to the application.

I'll report that to dochelp@microsoft.com in order to
clarify the situation.

In the meantime I added tests with a '-windows' suffix,
which demostrate the current windows server behavior,
while the tests with a '-sane' suffix expect the behavior
that whould make windows clients happy.

For Samba I'll implement the '-sane' behavior that
detects all replays and returns FILE_NOT_AVAILABLE
if the original request is still pending.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
selftest/knownfail.d/smb2.replay [new file with mode: 0644]
source4/torture/smb2/replay.c