diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-02-14 11:35:21 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-04-05 06:32:07 +1000 |
commit | ff9b6682a014f47e3b367c3286407bfc39fd286c (patch) | |
tree | 7086ed36ed1373875540559b4a355b583f430695 | |
parent | 17d8f0ad30847bb940f645ee1817d782ddaaee74 (diff) | |
download | samba-ff9b6682a014f47e3b367c3286407bfc39fd286c.tar.gz samba-ff9b6682a014f47e3b367c3286407bfc39fd286c.tar.xz samba-ff9b6682a014f47e3b367c3286407bfc39fd286c.zip |
s3-auth Rename user_session_key -> session_key to match auth_session_info
-rw-r--r-- | source3/auth/auth_ntlmssp.c | 12 | ||||
-rw-r--r-- | source3/auth/auth_util.c | 22 | ||||
-rw-r--r-- | source3/auth/check_samsec.c | 2 | ||||
-rw-r--r-- | source3/auth/server_info.c | 18 | ||||
-rw-r--r-- | source3/include/auth.h | 2 | ||||
-rw-r--r-- | source3/rpc_server/lsa/srv_lsa_nt.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/netlogon/srv_netlog_nt.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/rpc_ncacn_np.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/rpc_server.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/samr/srv_samr_nt.c | 20 | ||||
-rw-r--r-- | source3/rpc_server/wkssvc/srv_wkssvc_nt.c | 4 | ||||
-rw-r--r-- | source3/smbd/password.c | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_sesssetup.c | 4 |
13 files changed, 47 insertions, 47 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c index 99f4564cdf..58974210dd 100644 --- a/source3/auth/auth_ntlmssp.c +++ b/source3/auth/auth_ntlmssp.c @@ -102,7 +102,7 @@ static NTSTATUS auth_ntlmssp_set_challenge(struct ntlmssp_state *ntlmssp_state, */ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state, TALLOC_CTX *mem_ctx, - DATA_BLOB *user_session_key, DATA_BLOB *lm_session_key) + DATA_BLOB *session_key, DATA_BLOB *lm_session_key) { struct auth_ntlmssp_state *auth_ntlmssp_state = (struct auth_ntlmssp_state *)ntlmssp_state->callback_private; @@ -154,12 +154,12 @@ static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state, * NTLMSSP code will decide on the final correct session key, * and put it back here at the end of * auth_ntlmssp_steal_server_info */ - if (auth_ntlmssp_state->server_info->user_session_key.length) { + if (auth_ntlmssp_state->server_info->session_key.length) { DEBUG(10, ("Got NT session key of length %u\n", - (unsigned int)auth_ntlmssp_state->server_info->user_session_key.length)); - *user_session_key = auth_ntlmssp_state->server_info->user_session_key; - talloc_steal(mem_ctx, auth_ntlmssp_state->server_info->user_session_key.data); - auth_ntlmssp_state->server_info->user_session_key = data_blob_null; + (unsigned int)auth_ntlmssp_state->server_info->session_key.length)); + *session_key = auth_ntlmssp_state->server_info->session_key; + talloc_steal(mem_ctx, auth_ntlmssp_state->server_info->session_key.data); + auth_ntlmssp_state->server_info->session_key = data_blob_null; } if (auth_ntlmssp_state->server_info->lm_session_key.length) { DEBUG(10, ("Got LM session key of length %u\n", diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 8666b55b47..e2a687ddf4 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -465,11 +465,11 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx, } if (session_key) { - data_blob_free(&session_info->user_session_key); - session_info->user_session_key = data_blob_talloc(session_info, + data_blob_free(&session_info->session_key); + session_info->session_key = data_blob_talloc(session_info, session_key->data, session_key->length); - if (!session_info->user_session_key.data && session_key->length) { + if (!session_info->session_key.data && session_key->length) { return NT_STATUS_NO_MEMORY; } } @@ -788,7 +788,7 @@ static NTSTATUS make_new_server_info_guest(struct auth_serversupplied_info **ses /* annoying, but the Guest really does have a session key, and it is all zeros! */ - (*session_info)->user_session_key = data_blob(zeros, sizeof(zeros)); + (*session_info)->session_key = data_blob(zeros, sizeof(zeros)); (*session_info)->lm_session_key = data_blob(zeros, sizeof(zeros)); alpha_strcpy(tmp, (*session_info)->info3->base.account_name.string, @@ -909,8 +909,8 @@ struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx, } } - dst->user_session_key = data_blob_talloc( dst, src->user_session_key.data, - src->user_session_key.length); + dst->session_key = data_blob_talloc( dst, src->session_key.data, + src->session_key.length); dst->lm_session_key = data_blob_talloc(dst, src->lm_session_key.data, src->lm_session_key.length); @@ -945,12 +945,12 @@ struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx, bool session_info_set_session_key(struct auth_serversupplied_info *info, DATA_BLOB session_key) { - TALLOC_FREE(info->user_session_key.data); + TALLOC_FREE(info->session_key.data); - info->user_session_key = data_blob_talloc( + info->session_key = data_blob_talloc( info, session_key.data, session_key.length); - return (info->user_session_key.data != NULL); + return (info->session_key.data != NULL); } static struct auth_serversupplied_info *guest_info = NULL; @@ -1295,9 +1295,9 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, /* ensure we are never given NULL session keys */ if (memcmp(info3->base.key.key, zeros, sizeof(zeros)) == 0) { - result->user_session_key = data_blob_null; + result->session_key = data_blob_null; } else { - result->user_session_key = data_blob_talloc( + result->session_key = data_blob_talloc( result, info3->base.key.key, sizeof(info3->base.key.key)); } diff --git a/source3/auth/check_samsec.c b/source3/auth/check_samsec.c index f918dc0db1..c4bcda4b1b 100644 --- a/source3/auth/check_samsec.c +++ b/source3/auth/check_samsec.c @@ -492,7 +492,7 @@ NTSTATUS check_sam_security(const DATA_BLOB *challenge, goto done; } - (*server_info)->user_session_key = + (*server_info)->session_key = data_blob_talloc(*server_info, user_sess_key.data, user_sess_key.length); data_blob_free(&user_sess_key); diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c index 3190b756c4..440e45c8e5 100644 --- a/source3/auth/server_info.c +++ b/source3/auth/server_info.c @@ -80,11 +80,11 @@ NTSTATUS serverinfo_to_SamInfo2(struct auth_serversupplied_info *server_info, return NT_STATUS_NO_MEMORY; } - if (server_info->user_session_key.length) { + if (server_info->session_key.length) { memcpy(info3->base.key.key, - server_info->user_session_key.data, + server_info->session_key.data, MIN(sizeof(info3->base.key.key), - server_info->user_session_key.length)); + server_info->session_key.length)); if (pipe_session_key) { arcfour_crypt(info3->base.key.key, pipe_session_key, 16); @@ -123,11 +123,11 @@ NTSTATUS serverinfo_to_SamInfo3(const struct auth_serversupplied_info *server_in return NT_STATUS_NO_MEMORY; } - if (server_info->user_session_key.length) { + if (server_info->session_key.length) { memcpy(info3->base.key.key, - server_info->user_session_key.data, + server_info->session_key.data, MIN(sizeof(info3->base.key.key), - server_info->user_session_key.length)); + server_info->session_key.length)); if (pipe_session_key) { arcfour_crypt(info3->base.key.key, pipe_session_key, 16); @@ -181,11 +181,11 @@ NTSTATUS serverinfo_to_SamInfo6(struct auth_serversupplied_info *server_info, return NT_STATUS_NO_MEMORY; } - if (server_info->user_session_key.length) { + if (server_info->session_key.length) { memcpy(info3->base.key.key, - server_info->user_session_key.data, + server_info->session_key.data, MIN(sizeof(info3->base.key.key), - server_info->user_session_key.length)); + server_info->session_key.length)); if (pipe_session_key) { arcfour_crypt(info3->base.key.key, pipe_session_key, 16); diff --git a/source3/include/auth.h b/source3/include/auth.h index c017da98db..4f7cb9bb14 100644 --- a/source3/include/auth.h +++ b/source3/include/auth.h @@ -46,7 +46,7 @@ struct auth_serversupplied_info { * Bottom line, it is not the same as the session keys in info3. */ - DATA_BLOB user_session_key; + DATA_BLOB session_key; DATA_BLOB lm_session_key; struct netr_SamInfo3 *info3; diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c index 5f028e6507..9ea872b027 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -1751,7 +1751,7 @@ NTSTATUS _lsa_CreateTrustedDomainEx2(struct pipes_struct *p, auth_blob.data = r->in.auth_info->auth_blob.data; arcfour_crypt_blob(auth_blob.data, auth_blob.length, - &p->session_info->user_session_key); + &p->session_info->session_key); ndr_err = ndr_pull_struct_blob(&auth_blob, p->mem_ctx, &auth_struct, diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c index b17cfa2ffa..f0535c7295 100644 --- a/source3/rpc_server/netlogon/srv_netlog_nt.c +++ b/source3/rpc_server/netlogon/srv_netlog_nt.c @@ -1165,7 +1165,7 @@ static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx, in = data_blob_const(nt_hash->hash, 16); out = data_blob_talloc_zero(mem_ctx, 16); - sess_crypt_blob(&out, &in, &session_info->user_session_key, true); + sess_crypt_blob(&out, &in, &session_info->session_key, true); memcpy(info18.nt_pwd.hash, out.data, out.length); info18.nt_pwd_active = true; diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c index 855eece538..f000b64f71 100644 --- a/source3/rpc_server/rpc_ncacn_np.c +++ b/source3/rpc_server/rpc_ncacn_np.c @@ -659,7 +659,7 @@ struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx, /* Send the named_pipe_auth server the user's full token */ session_info_t->security_token = session_info->security_token; - session_info_t->session_key = session_info->user_session_key; + session_info_t->session_key = session_info->session_key; val.sam3 = session_info->info3; diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index 9934e196cc..2fa2a77112 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -51,7 +51,7 @@ static NTSTATUS auth_anonymous_session_info(TALLOC_CTX *mem_ctx, } i->security_token = s->security_token; - i->session_key = s->user_session_key; + i->session_key = s->session_key; val.sam3 = s->info3; diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c index 334a8846a4..99dd3f4d58 100644 --- a/source3/rpc_server/samr/srv_samr_nt.c +++ b/source3/rpc_server/samr/srv_samr_nt.c @@ -5159,7 +5159,7 @@ NTSTATUS _samr_SetUserInfo(struct pipes_struct *p, /* Used by AS/U JRA. */ status = set_user_info_18(&info->info18, p->mem_ctx, - &p->session_info->user_session_key, + &p->session_info->session_key, pwd); break; @@ -5171,16 +5171,16 @@ NTSTATUS _samr_SetUserInfo(struct pipes_struct *p, case 21: status = set_user_info_21(&info->info21, p->mem_ctx, - &p->session_info->user_session_key, + &p->session_info->session_key, pwd); break; case 23: - if (!p->session_info->user_session_key.length) { + if (!p->session_info->session_key.length) { status = NT_STATUS_NO_USER_SESSION_KEY; } arcfour_crypt_blob(info->info23.password.data, 516, - &p->session_info->user_session_key); + &p->session_info->session_key); dump_data(100, info->info23.password.data, 516); @@ -5191,12 +5191,12 @@ NTSTATUS _samr_SetUserInfo(struct pipes_struct *p, break; case 24: - if (!p->session_info->user_session_key.length) { + if (!p->session_info->session_key.length) { status = NT_STATUS_NO_USER_SESSION_KEY; } arcfour_crypt_blob(info->info24.password.data, 516, - &p->session_info->user_session_key); + &p->session_info->session_key); dump_data(100, info->info24.password.data, 516); @@ -5206,12 +5206,12 @@ NTSTATUS _samr_SetUserInfo(struct pipes_struct *p, break; case 25: - if (!p->session_info->user_session_key.length) { + if (!p->session_info->session_key.length) { status = NT_STATUS_NO_USER_SESSION_KEY; } encode_or_decode_arc4_passwd_buffer( info->info25.password.data, - &p->session_info->user_session_key); + &p->session_info->session_key); dump_data(100, info->info25.password.data, 532); @@ -5221,12 +5221,12 @@ NTSTATUS _samr_SetUserInfo(struct pipes_struct *p, break; case 26: - if (!p->session_info->user_session_key.length) { + if (!p->session_info->session_key.length) { status = NT_STATUS_NO_USER_SESSION_KEY; } encode_or_decode_arc4_passwd_buffer( info->info26.password.data, - &p->session_info->user_session_key); + &p->session_info->session_key); dump_data(100, info->info26.password.data, 516); diff --git a/source3/rpc_server/wkssvc/srv_wkssvc_nt.c b/source3/rpc_server/wkssvc/srv_wkssvc_nt.c index 9459599cc6..d44414f776 100644 --- a/source3/rpc_server/wkssvc/srv_wkssvc_nt.c +++ b/source3/rpc_server/wkssvc/srv_wkssvc_nt.c @@ -842,7 +842,7 @@ WERROR _wkssvc_NetrJoinDomain2(struct pipes_struct *p, werr = decode_wkssvc_join_password_buffer( p->mem_ctx, r->in.encrypted_password, - &p->session_info->user_session_key, &cleartext_pwd); + &p->session_info->session_key, &cleartext_pwd); if (!W_ERROR_IS_OK(werr)) { return werr; } @@ -908,7 +908,7 @@ WERROR _wkssvc_NetrUnjoinDomain2(struct pipes_struct *p, werr = decode_wkssvc_join_password_buffer( p->mem_ctx, r->in.encrypted_password, - &p->session_info->user_session_key, &cleartext_pwd); + &p->session_info->session_key, &cleartext_pwd); if (!W_ERROR_IS_OK(werr)) { return werr; } diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 4b38de7eca..720b1bf4c2 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -331,7 +331,7 @@ int register_existing_vuid(struct smbd_server_connection *sconn, /* Try and turn on server signing on the first non-guest * sessionsetup. */ srv_set_signing(sconn, - vuser->session_info->user_session_key, + vuser->session_info->session_key, response_blob); } diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 722e4c7705..d727ee98b0 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -260,7 +260,7 @@ static NTSTATUS smbd_smb2_session_setup_krb5(struct smbd_smb2_session *session, session->do_signing = false; } - session->session_key = session->session_info->user_session_key; + session->session_key = session->session_info->session_key; session->compat_vuser = talloc_zero(session, user_struct); if (session->compat_vuser == NULL) { @@ -466,7 +466,7 @@ static NTSTATUS smbd_smb2_common_ntlmssp_auth_return(struct smbd_smb2_session *s session->do_signing = false; } - session->session_key = session->session_info->user_session_key; + session->session_key = session->session_info->session_key; session->compat_vuser = talloc_zero(session, user_struct); if (session->compat_vuser == NULL) { |