From 1a4f4d2cf052edde8ef6893081ed3c5a756e51d2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 9 Jun 2008 21:41:55 +0200 Subject: SMB2-CONNECT: remove reference to req->session before calling smb2_logoff_recv() on the invalid session metze (This used to be commit 93203e8e318dd10b9e7096e586187eb271d42134) --- source4/torture/smb2/connect.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source4/torture') diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c index 826bb2d719..e77e32ff7a 100644 --- a/source4/torture/smb2/connect.c +++ b/source4/torture/smb2/connect.c @@ -193,6 +193,7 @@ bool torture_smb2_connect(struct torture_context *torture) { TALLOC_CTX *mem_ctx = talloc_new(NULL); struct smb2_tree *tree; + struct smb2_request *req; struct smb2_handle h1, h2; NTSTATUS status; @@ -242,7 +243,15 @@ bool torture_smb2_connect(struct torture_context *torture) return false; } - status = smb2_logoff(tree->session); + req = smb2_logoff_send(tree->session); + if (!req) { + printf("smb2_logoff_send() failed\n"); + return false; + } + + req->session = NULL; + + status = smb2_logoff_recv(req); if (!NT_STATUS_EQUAL(status, NT_STATUS_USER_SESSION_DELETED)) { printf("Logoff should have disabled session - %s\n", nt_errstr(status)); return false; -- cgit