diff options
-rw-r--r-- | source4/libcli/smb_composite/sesssetup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c index 63f3a8e10d..a69d300b52 100644 --- a/source4/libcli/smb_composite/sesssetup.c +++ b/source4/libcli/smb_composite/sesssetup.c @@ -195,16 +195,20 @@ static void request_handler(struct smbcli_request *req) } if (NT_STATUS_IS_OK(state->remote_status)) { + DATA_BLOB session_key; + if (state->setup.spnego.in.secblob.length) { c->status = NT_STATUS_INTERNAL_ERROR; break; } - session_key_err = gensec_session_key(session->gensec, session, &session->user_session_key); + session_key_err = gensec_session_key(session->gensec, session, &session_key); if (NT_STATUS_IS_OK(session_key_err)) { smb1cli_conn_activate_signing(session->transport->conn, - session->user_session_key, + session_key, null_data_blob); } + set_user_session_key(session, &session_key); + data_blob_free(&session_key); } if (state->setup.spnego.in.secblob.length) { |