summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-08-18 16:08:46 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-08-23 13:16:20 +0200
commit7a554ee7dcefdff599ebc6fbf4e128b33ffccf29 (patch)
tree8eae1e786330093ea44dff998958cb3ad38a12d1
parent95e30b081f273f2d156792577179c5220c0a10cc (diff)
downloadsamba-7a554ee7dcefdff599ebc6fbf4e128b33ffccf29.tar.gz
s3:libsmb: Pass domain to remote_password_change()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12975 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
-rw-r--r--source3/include/proto.h3
-rw-r--r--source3/libsmb/passchange.c5
-rw-r--r--source3/utils/smbpasswd.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index c8f6c282b68..976f3f92156 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -823,7 +823,8 @@ bool get_dc_name(const char *domain,
/* The following definitions come from libsmb/passchange.c */
-NTSTATUS remote_password_change(const char *remote_machine, const char *user_name,
+NTSTATUS remote_password_change(const char *remote_machine,
+ const char *domain, const char *user_name,
const char *old_passwd, const char *new_passwd,
char **err_str);
diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c
index c89b7ca85d1..48ffba8036f 100644
--- a/source3/libsmb/passchange.c
+++ b/source3/libsmb/passchange.c
@@ -30,7 +30,8 @@
Change a password on a remote machine using IPC calls.
*************************************************************/
-NTSTATUS remote_password_change(const char *remote_machine, const char *user_name,
+NTSTATUS remote_password_change(const char *remote_machine,
+ const char *domain, const char *user_name,
const char *old_passwd, const char *new_passwd,
char **err_str)
{
@@ -55,7 +56,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
creds = cli_session_creds_init(cli,
user_name,
- NULL, /* domain */
+ domain,
NULL, /* realm */
old_passwd,
false, /* use_kerberos */
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index ae9862606f1..00d2acf2a5f 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -258,7 +258,8 @@ static NTSTATUS password_change(const char *remote_mach, char *username,
fprintf(stderr, "Invalid remote operation!\n");
return NT_STATUS_UNSUCCESSFUL;
}
- ret = remote_password_change(remote_mach, username,
+ ret = remote_password_change(remote_mach,
+ NULL, username,
old_passwd, new_pw, &err_str);
} else {
ret = local_password_change(username, local_flags, new_pw,