summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-28 08:47:56 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-28 21:12:07 +0200
commit4732f5b2108f6c16849f8c7a7fae3cc486cf0fe3 (patch)
tree7dc99f66c04227bff64563c57652adf10a88ab5e /source4
parent1f4bf0fb0fbcecd6de92047f6f68bf822af67a09 (diff)
downloadsamba-4732f5b2108f6c16849f8c7a7fae3cc486cf0fe3.tar.gz
samba-4732f5b2108f6c16849f8c7a7fae3cc486cf0fe3.tar.bz2
samba-4732f5b2108f6c16849f8c7a7fae3cc486cf0fe3.zip
s4:torture/smb2/lock: remove samba4 specific checks for NETWORK_NAME_DELETED/USER_SESSION_DELETED
Most Windows versions have a strange order to verify the session id, tree id and file id. (They should be checked in that order, but windows seems to check the file id before the others). metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Sep 28 21:12:07 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/smb2/lock.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/source4/torture/smb2/lock.c b/source4/torture/smb2/lock.c
index 5bccf04f43..aee82929c1 100644
--- a/source4/torture/smb2/lock.c
+++ b/source4/torture/smb2/lock.c
@@ -1056,12 +1056,13 @@ static bool test_cancel_tdis(struct torture_context *torture,
lck.in.file.handle = h;
el[0].flags = SMB2_LOCK_FLAG_UNLOCK;
status = smb2_lock(tree, &lck);
- if (torture_setting_bool(torture, "samba4", false)) {
- /* checking if the tcon supplied are still valid
- * should happen before you validate a file handle,
- * so we should return USER_SESSION_DELETED */
- CHECK_STATUS(status, NT_STATUS_NETWORK_NAME_DELETED);
- } else {
+ /*
+ * Most Windows versions have a strange order to
+ * verify the session id, tree id and file id.
+ * (They should be checked in that order, but windows
+ * seems to check the file id before the others).
+ */
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED)) {
CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
}
@@ -1141,12 +1142,13 @@ static bool test_cancel_logoff(struct torture_context *torture,
lck.in.file.handle = h;
el[0].flags = SMB2_LOCK_FLAG_UNLOCK;
status = smb2_lock(tree, &lck);
- if (torture_setting_bool(torture, "samba4", false)) {
- /* checking if the credential supplied are still valid
- * should happen before you validate a file handle,
- * so we should return USER_SESSION_DELETED */
- CHECK_STATUS(status, NT_STATUS_USER_SESSION_DELETED);
- } else {
+ /*
+ * Most Windows versions have a strange order to
+ * verify the session id, tree id and file id.
+ * (They should be checked in that order, but windows
+ * seems to check the file id before the others).
+ */
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_USER_SESSION_DELETED)) {
CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
}