diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-09-16 18:36:43 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-01-07 12:47:13 +0100 |
commit | 57741dd4ba5a9ed3abf7aad35a2a69fd66b49b4b (patch) | |
tree | 1febcd702d68c2f91345d981f2810ddc82658694 | |
parent | dbd49d90bbf175525557eaa983ad57ca5076d710 (diff) | |
download | samba-57741dd4ba5a9ed3abf7aad35a2a69fd66b49b4b.tar.gz samba-57741dd4ba5a9ed3abf7aad35a2a69fd66b49b4b.tar.xz samba-57741dd4ba5a9ed3abf7aad35a2a69fd66b49b4b.zip |
s3:winbindd: make use of trust_pw_change() for periodic password changes
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source3/winbindd/winbindd_dual.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index b26cdca4e6..1d6a5baf70 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -29,6 +29,7 @@ #include "includes.h" #include "winbindd.h" +#include "rpc_client/rpc_client.h" #include "nsswitch/wb_reqtrans.h" #include "secrets.h" #include "../lib/util/select.h" @@ -999,10 +1000,10 @@ static void machine_password_change_handler(struct tevent_context *ctx, struct timeval now, void *private_data) { + struct messaging_context *msg_ctx = winbind_messaging_context(); struct winbindd_child *child = (struct winbindd_child *)private_data; struct rpc_pipe_client *netlogon_pipe = NULL; - TALLOC_CTX *frame; NTSTATUS result; struct timeval next_change; @@ -1039,15 +1040,14 @@ static void machine_password_change_handler(struct tevent_context *ctx, return; } - frame = talloc_stackframe(); - - result = trust_pw_find_change_and_store_it(netlogon_pipe, - frame, - child->domain->name); - TALLOC_FREE(frame); + result = trust_pw_change(child->domain->conn.netlogon_creds, + msg_ctx, + netlogon_pipe->binding_handle, + child->domain->name, + false); /* force */ DEBUG(10, ("machine_password_change_handler: " - "trust_pw_find_change_and_store_it returned %s\n", + "trust_pw_change returned %s\n", nt_errstr(result))); if (NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) ) { |