r15803: the SMB2 server gives NT_STATUS_NOT_FOUND instead of NT_STATUS_INVALID_HANDLE
authorStefan Metzmacher <metze@samba.org>
Mon, 22 May 2006 14:18:17 +0000 (14:18 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:08:25 +0000 (14:08 -0500)
metze
(This used to be commit aa98aad0975e59fc8cf56c624f728b33ab54e099)

source4/smb_server/smb2/smb2_server.h
source4/torture/smb2/connect.c

index 4f4e76994082baf1c28d2ccd073d15f777b90c93..daf7e315c26448b7bab8fb82da317b418ebdc310 100644 (file)
@@ -114,7 +114,7 @@ struct smbsrv_request;
 
 #define SMB2SRV_CHECK_FILE_HANDLE(handle) do { \
        if (!handle) { \
-               smb2srv_send_error(req, NT_STATUS_INVALID_HANDLE); \
+               smb2srv_send_error(req, NT_STATUS_NOT_FOUND); \
                return; \
        } \
 } while (0)
index 54075b17d0a9e6aacce4e6e0f665014fa8519281..3b12e54a3b9cf094c0c02d300ff8cbf613fbb70b 100644 (file)
@@ -207,6 +207,12 @@ BOOL torture_smb2_connect(struct torture_context *torture)
        torture_smb2_close(tree, h1);
        torture_smb2_close(tree, h2);
 
+       status = smb2_util_close(tree, h1);
+       if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+               printf("close should have closed the handle - %s\n", nt_errstr(status));
+               return False;
+       }
+
        status = smb2_tdis(tree);
        if (!NT_STATUS_IS_OK(status)) {
                printf("tdis failed - %s\n", nt_errstr(status));