SMB2-LOCK: let the test pass against samba4
authorStefan Metzmacher <metze@samba.org>
Wed, 20 May 2009 13:23:51 +0000 (15:23 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 20 May 2009 13:26:54 +0000 (15:26 +0200)
metze

source4/torture/smb2/lock.c

index 844309efd4caca5e290ac398488676ed3442a385..b97233ef66139dcfc054aea636c7fda7c0c38248 100644 (file)
@@ -111,9 +111,12 @@ static bool test_valid_request(struct torture_context *torture, struct smb2_tree
        status = smb2_lock(tree, &lck);
        if (TARGET_IS_WIN7(torture)) {
                CHECK_STATUS(status, NT_STATUS_INVALID_LOCK_RANGE);
-       } else {
+       } else if (TARGET_IS_WINDOWS(torture)) {
                CHECK_STATUS(status, NT_STATUS_OK);
+       } else {
+               CHECK_STATUS(status, NT_STATUS_LOCK_NOT_GRANTED);
        }
+       CHECK_VALUE(lck.out.reserved, 0);
 
        lck.in.reserved         = 0x123ab3;
        status = smb2_lock(tree, &lck);
@@ -130,9 +133,12 @@ static bool test_valid_request(struct torture_context *torture, struct smb2_tree
        status = smb2_lock(tree, &lck);
        if (TARGET_IS_WIN7(torture)) {
                CHECK_STATUS(status, NT_STATUS_INVALID_LOCK_RANGE);
+       } else if (TARGET_IS_WINDOWS(torture)) {
+               CHECK_STATUS(status, NT_STATUS_OK);
        } else {
                CHECK_STATUS(status, NT_STATUS_LOCK_NOT_GRANTED);
        }
+       CHECK_VALUE(lck.out.reserved, 0);
 
        lck.in.reserved         = 0x123ab5;
        status = smb2_lock(tree, &lck);