diff options
author | Alexander Bokovoy <ab@samba.org> | 2008-04-21 11:38:20 +0400 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2008-04-21 11:38:20 +0400 |
commit | ff615f232968979f57a31f43a4f668c2c4fd20df (patch) | |
tree | 8e4d6e1181001dd35e32008a3401020c013e288b /source3/libsmb/passchange.c | |
parent | 09caab9f37d6ecd4fd6fe9ce3c284730b232651a (diff) | |
parent | 0db7aba8af80a01150d1061a4192ab814e4234b7 (diff) | |
download | samba-ff615f232968979f57a31f43a4f668c2c4fd20df.tar.gz samba-ff615f232968979f57a31f43a4f668c2c4fd20df.tar.bz2 samba-ff615f232968979f57a31f43a4f668c2c4fd20df.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 2c3ffc1c53550c8e6feeca8fc0270ef9ac1ec70a)
Diffstat (limited to 'source3/libsmb/passchange.c')
-rw-r--r-- | source3/libsmb/passchange.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c index 468750f801..8f7cbf265e 100644 --- a/source3/libsmb/passchange.c +++ b/source3/libsmb/passchange.c @@ -177,8 +177,9 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam } } - if (NT_STATUS_IS_OK(result = rpccli_samr_chgpasswd_user(pipe_hnd, pipe_hnd->mem_ctx, user_name, - new_passwd, old_passwd))) { + result = rpccli_samr_chgpasswd_user(pipe_hnd, talloc_tos(), + user_name, new_passwd, old_passwd); + if (NT_STATUS_IS_OK(result)) { /* Great - it all worked! */ cli_shutdown(cli); return NT_STATUS_OK; @@ -195,7 +196,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam } /* OK, that failed, so try again... */ - cli_rpc_pipe_close(pipe_hnd); + TALLOC_FREE(pipe_hnd); /* Try anonymous NTLMSSP... */ cli_init_creds(cli, "", "", NULL); @@ -206,11 +207,9 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam pipe_hnd = cli_rpc_pipe_open_noauth(cli, PI_SAMR, &result); if ( pipe_hnd && - (NT_STATUS_IS_OK(result = rpccli_samr_chgpasswd_user(pipe_hnd, - pipe_hnd->mem_ctx, - user_name, - new_passwd, - old_passwd)))) { + (NT_STATUS_IS_OK(result = rpccli_samr_chgpasswd_user( + pipe_hnd, talloc_tos(), user_name, + new_passwd, old_passwd)))) { /* Great - it all worked! */ cli_shutdown(cli); return NT_STATUS_OK; |