From b8407c22d920df726c2e7dd0d92756ca8eb28dc9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 27 Feb 2012 13:23:53 +0100 Subject: [PATCH] s3:torture/test_smb2: show that a session is not valid for path based calls during reauth metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Mon Feb 27 16:29:02 CET 2012 on sn-devel-104 --- source3/torture/test_smb2.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source3/torture/test_smb2.c b/source3/torture/test_smb2.c index 1a9009a7003..5b37213f129 100644 --- a/source3/torture/test_smb2.c +++ b/source3/torture/test_smb2.c @@ -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, -- 2.34.1