diff options
author | Günther Deschner <gd@samba.org> | 2012-12-05 16:37:02 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-12-09 19:39:08 +0100 |
commit | 306a78d97f2fdfaa81c58bafdebcfab0fb8f1636 (patch) | |
tree | 3f5391a48f0425b9ae67eb709dd348eae62e329f /source3/rpc_server | |
parent | fd7087020344f7d24737e3be2f3afbd0417b0026 (diff) | |
download | samba-306a78d97f2fdfaa81c58bafdebcfab0fb8f1636.tar.gz samba-306a78d97f2fdfaa81c58bafdebcfab0fb8f1636.tar.bz2 samba-306a78d97f2fdfaa81c58bafdebcfab0fb8f1636.zip |
s3-rpc_server: pass down netlogon cred state in _netr_ServerGetTrustInfo().
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/netlogon/srv_netlog_nt.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c index 5fc2756963..aef97e4f9a 100644 --- a/source3/rpc_server/netlogon/srv_netlog_nt.c +++ b/source3/rpc_server/netlogon/srv_netlog_nt.c @@ -2398,7 +2398,7 @@ NTSTATUS _netr_GetForestTrustInformation(struct pipes_struct *p, static NTSTATUS get_password_from_trustAuth(TALLOC_CTX *mem_ctx, const DATA_BLOB *trustAuth_blob, - const DATA_BLOB *session_key, + struct netlogon_creds_CredentialState *creds, struct samr_Password *current_pw_enc, struct samr_Password *previous_pw_enc) { @@ -2421,8 +2421,7 @@ static NTSTATUS get_password_from_trustAuth(TALLOC_CTX *mem_ctx, return NT_STATUS_UNSUCCESSFUL; } - arcfour_crypt_blob(current_pw_enc->hash, sizeof(current_pw_enc->hash), - session_key); + netlogon_creds_arcfour_crypt(creds, current_pw_enc->hash, sizeof(current_pw_enc->hash)); if (trustAuth.previous.count != 0 && trustAuth.previous.array[0].AuthType == TRUST_AUTH_TYPE_CLEAR) { @@ -2432,8 +2431,8 @@ static NTSTATUS get_password_from_trustAuth(TALLOC_CTX *mem_ctx, } else { mdfour(previous_pw_enc->hash, NULL, 0); } - arcfour_crypt_blob(previous_pw_enc->hash, sizeof(previous_pw_enc->hash), - session_key); + + netlogon_creds_arcfour_crypt(creds, previous_pw_enc->hash, sizeof(previous_pw_enc->hash)); return NT_STATUS_OK; } @@ -2455,7 +2454,6 @@ NTSTATUS _netr_ServerGetTrustInfo(struct pipes_struct *p, DATA_BLOB trustAuth_blob; struct samr_Password *new_owf_enc; struct samr_Password *old_owf_enc; - DATA_BLOB session_key; struct loadparm_context *lp_ctx; lp_ctx = loadparm_init_s3(p->mem_ctx, loadparm_s3_helpers()); @@ -2543,10 +2541,8 @@ NTSTATUS _netr_ServerGetTrustInfo(struct pipes_struct *p, trustAuth_blob = td->trust_auth_outgoing; } - session_key.data = creds->session_key; - session_key.length = sizeof(creds->session_key); status = get_password_from_trustAuth(p->mem_ctx, &trustAuth_blob, - &session_key, + creds, new_owf_enc, old_owf_enc); if (!NT_STATUS_IS_OK(status)) { |