diff options
-rw-r--r-- | source4/smb_server/sesssetup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c index f9b2eee1b2..aeae404d6a 100644 --- a/source4/smb_server/sesssetup.c +++ b/source4/smb_server/sesssetup.c @@ -271,6 +271,10 @@ static NTSTATUS sesssetup_spnego(struct smbsrv_request *req, union smb_sesssetup } } else { status = nt_status_squash(status); + if (smb_sess->gensec_ctx && + !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { + gensec_end(&smb_sess->gensec_ctx); + } } sess->spnego.out.action = 0; |