summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2012-12-11 09:29:37 +0100
committerAndreas Schneider <asn@samba.org>2013-02-07 14:07:15 +0100
commit823a25f6a47c311ab33874be8a889ffbaf8db527 (patch)
tree57f93a99be141cba937cfa86db9173eeca484d40
parentff496ef29fe0eb8db929ba014abf5f8eeed86b33 (diff)
downloadsamba-823a25f6a47c311ab33874be8a889ffbaf8db527.tar.gz
samba-823a25f6a47c311ab33874be8a889ffbaf8db527.tar.bz2
samba-823a25f6a47c311ab33874be8a889ffbaf8db527.zip
s3-rpc_server: Dont wipe out ref pointers in _netr_ServerGetTrustInfo().
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source3/rpc_server/netlogon/srv_netlog_nt.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index cfd91c263f..96e1c8751c 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -2470,8 +2470,6 @@ NTSTATUS _netr_ServerGetTrustInfo(struct pipes_struct *p,
struct netr_TrustInfo *trust_info;
struct pdb_trusted_domain *td;
DATA_BLOB trustAuth_blob;
- struct samr_Password *new_owf_enc;
- struct samr_Password *old_owf_enc;
struct loadparm_context *lp_ctx;
lp_ctx = loadparm_init_s3(p->mem_ctx, loadparm_s3_helpers());
@@ -2545,12 +2543,6 @@ NTSTATUS _netr_ServerGetTrustInfo(struct pipes_struct *p,
*r->out.trust_info = trust_info;
}
- new_owf_enc = talloc_zero(p->mem_ctx, struct samr_Password);
- old_owf_enc = talloc_zero(p->mem_ctx, struct samr_Password);
- if (new_owf_enc == NULL || old_owf_enc == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
/* TODO: which trustAuth shall we use if we have in/out trust or do they have to
* be equal ? */
if (td->trust_direction & NETR_TRUST_FLAG_INBOUND) {
@@ -2561,18 +2553,17 @@ NTSTATUS _netr_ServerGetTrustInfo(struct pipes_struct *p,
status = get_password_from_trustAuth(p->mem_ctx, &trustAuth_blob,
creds,
- new_owf_enc, old_owf_enc);
+ r->out.new_owf_password,
+ r->out.old_owf_password);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
- r->out.new_owf_password = new_owf_enc;
- r->out.old_owf_password = old_owf_enc;
} else {
/* TODO: look for machine password */
- r->out.new_owf_password = NULL;
- r->out.old_owf_password = NULL;
+ ZERO_STRUCTP(r->out.new_owf_password);
+ ZERO_STRUCTP(r->out.old_owf_password);
return NT_STATUS_NOT_IMPLEMENTED;
}