From 288e7ea7dc0fce539c0b8e5325b32050848537a8 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 3 Sep 2014 14:54:34 -0400 Subject: [PATCH] tree connect after session setup --- smb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/smb.c b/smb.c index 0223052..bdbab0a 100644 --- a/smb.c +++ b/smb.c @@ -654,6 +654,7 @@ int negotiate(Word ipid, uint16_t *path) // send a second session_setup if STATUS_MORE_PROCESSING_REQUIRED if (tmp) { + uint32_t status; setup_req.security_buffer_length = sizeof(setup2); write_message(ipid, &setup_req, sizeof(setup_req), setup2, sizeof(setup2)); @@ -671,8 +672,14 @@ int negotiate(Word ipid, uint16_t *path) return -1; } + status = responsePtr->header.status == STATUS_MORE_PROCESSING_REQUIRED; DisposeHandle(h); - return -1; + + if (status != 0) + { + fprintf(stderr, "Session error: %08lx\n", status); + return -1; + } }