s3:net_rpc: make use of trust_pw_change()
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Sep 2013 16:34:48 +0000 (18:34 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Jan 2014 11:47:12 +0000 (12:47 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/utils/net_rpc.c

index 26c7e159edfb807d2ab6260cd02babb4b5d61118..2a1a0bcef5904cbf3164578a860179d4cf43dbb6 100644 (file)
@@ -279,7 +279,11 @@ static NTSTATUS rpc_changetrustpw_internals(struct net_context *c,
 {
        NTSTATUS status;
 
-       status = trust_pw_find_change_and_store_it(pipe_hnd, mem_ctx, c->opt_target_workgroup);
+       status = trust_pw_change(c->netlogon_creds,
+                                c->msg_ctx,
+                                pipe_hnd->binding_handle,
+                                c->opt_target_workgroup,
+                                true); /* force */
        if (!NT_STATUS_IS_OK(status)) {
                d_fprintf(stderr, _("Failed to change machine account password: %s\n"),
                        nt_errstr(status));