1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00

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>
(cherry picked from commit 7a554ee7dc)
This commit is contained in:
Andreas Schneider 2017-08-18 16:08:46 +02:00 committed by Karolin Seeger
parent 048508034b
commit 90b5cbb752
3 changed files with 7 additions and 4 deletions

View File

@ -834,7 +834,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);

View File

@ -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 */

View File

@ -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,