s3:torture/test_smb2: show that a session is not valid for path based calls during...
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Feb 2012 12:23:53 +0000 (13:23 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 27 Feb 2012 15:29:02 +0000 (16:29 +0100)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Feb 27 16:29:02 CET 2012 on sn-devel-104

source3/torture/test_smb2.c

index 1a9009a70036c54ed5ba724b4d1f65c9bb244248..5b37213f129b54b07316ce323585aed754805681 100644 (file)
@@ -1176,6 +1176,22 @@ bool run_smb2_session_reauth(int dummy)
                return false;
        }
 
+       status = smb2cli_create(cli, "session-reauth-invalid.txt",
+                       SMB2_OPLOCK_LEVEL_NONE, /* oplock_level, */
+                       SMB2_IMPERSONATION_IMPERSONATION, /* impersonation_level, */
+                       SEC_STD_ALL | SEC_FILE_ALL, /* desired_access, */
+                       FILE_ATTRIBUTE_NORMAL, /* file_attributes, */
+                       FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, /* share_access, */
+                       FILE_CREATE, /* create_disposition, */
+                       FILE_DELETE_ON_CLOSE, /* create_options, */
+                       NULL, /* smb2_create_blobs *blobs */
+                       &fid_persistent,
+                       &fid_volatile);
+       if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_HANDLE)) {
+               printf("smb2cli_create %s\n", nt_errstr(status));
+               return false;
+       }
+
        subreq = smb2cli_session_setup_send(talloc_tos(), ev,
                                            cli->conn,
                                            cli->timeout,