s4:rpc_server/netlogon: implement dcesrv_netr_ServerTrustPasswordsGet()
authorStefan Metzmacher <metze@samba.org>
Mon, 9 Mar 2015 12:19:06 +0000 (13:19 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Jul 2015 16:38:21 +0000 (18:38 +0200)
We just need to call dcesrv_netr_ServerGetTrustInfo() and ignore trust_info.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/knownfail
source4/rpc_server/netlogon/dcerpc_netlogon.c

index e968c93a817ed0bb7a119a782d1f35de1a785ade..6d6093c460ed2e174a32ddf6cbebd0c638273c85 100644 (file)
@@ -94,7 +94,6 @@
 ^samba4.rpc.netlogon.*.NetrEnumerateTrustedDomains
 ^samba4.rpc.netlogon.*.NetrEnumerateTrustedDomainsEx
 ^samba4.rpc.netlogon.*.GetPassword
-^samba4.rpc.netlogon.*.GetTrustPasswords
 ^samba4.rpc.netlogon.*.DatabaseRedo
 ^samba4.base.charset.*.Testing partial surrogate
 ^samba4.*.base.maximum_allowed         # broken until we implement NTCREATEX_OPTIONS_BACKUP_INTENT
index a85ccb936b12900ed6e9af3419c2c6fc0ed928f1..bab47235c6c972ca27987b04e1f6a5213929d65d 100644 (file)
@@ -2520,13 +2520,37 @@ static WERROR dcesrv_netr_DsrDeregisterDNSHostRecords(struct dcesrv_call_state *
 }
 
 
+static NTSTATUS dcesrv_netr_ServerGetTrustInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+                      struct netr_ServerGetTrustInfo *r);
+
 /*
   netr_ServerTrustPasswordsGet
 */
 static NTSTATUS dcesrv_netr_ServerTrustPasswordsGet(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
                       struct netr_ServerTrustPasswordsGet *r)
 {
-       DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
+       struct netr_ServerGetTrustInfo r2 = {};
+       struct netr_TrustInfo *_ti = NULL;
+       NTSTATUS status;
+
+       r2.in.server_name = r->in.server_name;
+       r2.in.account_name = r->in.account_name;
+       r2.in.secure_channel_type = r->in.secure_channel_type;
+       r2.in.computer_name = r->in.computer_name;
+       r2.in.credential = r->in.credential;
+
+       r2.out.return_authenticator = r->out.return_authenticator;
+       r2.out.new_owf_password = r->out.new_owf_password;
+       r2.out.old_owf_password = r->out.old_owf_password;
+       r2.out.trust_info = &_ti;
+
+       status = dcesrv_netr_ServerGetTrustInfo(dce_call, mem_ctx, &r2);
+
+       r->out.return_authenticator = r2.out.return_authenticator;
+       r->out.new_owf_password = r2.out.new_owf_password;
+       r->out.old_owf_password = r2.out.old_owf_password;
+
+       return status;
 }