summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-02 18:46:09 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-04 09:10:22 +0200
commit3d63e4da170881f4d0381bf9e01e0ceab10c2a90 (patch)
tree2282d8711fc24adf1f48b22a7eb1acf38567beae
parentba864b83fa43062a684204cbaf9bf1b0c2074533 (diff)
downloadsamba-3d63e4da170881f4d0381bf9e01e0ceab10c2a90.tar.gz
samba-3d63e4da170881f4d0381bf9e01e0ceab10c2a90.tar.bz2
samba-3d63e4da170881f4d0381bf9e01e0ceab10c2a90.zip
s3:smbd: keep the "application session key" during SMB1 reauth
metze
-rw-r--r--source3/smbd/sesssetup.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index dc3e2540f4..ad68c2663c 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -373,7 +373,17 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
action = 1;
}
+ /*
+ * Keep the application key
+ */
+ data_blob_clear_free(&session_info->session_key);
+ session_info->session_key =
+ session->global->auth_session_info->session_key;
+ talloc_steal(session_info, session_info->session_key.data);
+ TALLOC_FREE(session->global->auth_session_info);
+
session->compat->session_info = session_info;
+
session->compat->vuid = session->global->session_wire_id;
if (security_session_user_level(session_info, NULL) >= SECURITY_USER) {
@@ -386,8 +396,8 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
session_info->info->domain_name);
session->status = NT_STATUS_OK;
- TALLOC_FREE(session->global->auth_session_info);
- session->global->auth_session_info = session_info;
+ session->global->auth_session_info = talloc_move(session->global,
+ &session_info);
session->global->auth_session_info_seqnum += 1;
session->global->channels[0].auth_session_info_seqnum =
session->global->auth_session_info_seqnum;