summaryrefslogtreecommitdiff
path: root/source3/libsmb/passchange.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-03-13 17:49:24 -0700
committerJeremy Allison <jra@samba.org>2009-03-13 17:49:24 -0700
commitf48a345e4a215173ad9e7d2777bacc0decb2bcc7 (patch)
tree411aabcb24f39c0e9c908cac0aef264920564810 /source3/libsmb/passchange.c
parent5df46fa35bd7c7aa083d4db1331b6f056ef70c77 (diff)
downloadsamba-f48a345e4a215173ad9e7d2777bacc0decb2bcc7.tar.gz
samba-f48a345e4a215173ad9e7d2777bacc0decb2bcc7.tar.bz2
samba-f48a345e4a215173ad9e7d2777bacc0decb2bcc7.zip
Remove pwd_cache.c, it was doing nothing. Make user_name, domain, and
password talloc'ed strings within the cli_struct. Jeremy.
Diffstat (limited to 'source3/libsmb/passchange.c')
-rw-r--r--source3/libsmb/passchange.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c
index f9ff4b3191..45cd392a5a 100644
--- a/source3/libsmb/passchange.c
+++ b/source3/libsmb/passchange.c
@@ -133,9 +133,17 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
return result;
}
- cli_init_creds(cli, "", "", NULL);
+ result = cli_init_creds(cli, "", "", NULL);
+ if (!NT_STATUS_IS_OK(result)) {
+ cli_shutdown(cli);
+ return result;
+ }
} else {
- cli_init_creds(cli, user_name, "", old_passwd);
+ result = cli_init_creds(cli, user_name, "", old_passwd);
+ if (!NT_STATUS_IS_OK(result)) {
+ cli_shutdown(cli);
+ return result;
+ }
}
result = cli_tcon_andx(cli, "IPC$", "IPC", "", 1);
@@ -222,7 +230,11 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
TALLOC_FREE(pipe_hnd);
/* Try anonymous NTLMSSP... */
- cli_init_creds(cli, "", "", NULL);
+ result = cli_init_creds(cli, "", "", NULL);
+ if (!NT_STATUS_IS_OK(result)) {
+ cli_shutdown(cli);
+ return result;
+ }
result = NT_STATUS_UNSUCCESSFUL;