diff options
author | Andreas Schneider <asn@samba.org> | 2017-08-18 16:14:57 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-08-23 13:16:20 +0200 |
commit | b483340639157fe95777672f5723455c48c3c616 (patch) | |
tree | 531cbac26035d8607aab292769d5c38b4452c086 | |
parent | 41a31a71abe144362fc7483fabba39aafa866373 (diff) | |
download | samba-b483340639157fe95777672f5723455c48c3c616.tar.gz |
s3:utils: Pass domain to password_change() in smbpasswd
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/utils/smbpasswd.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 5c75f48189d..b8a8e9c71b6 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -244,7 +244,7 @@ static char *prompt_for_new_password(bool stdin_get) *************************************************************/ static NTSTATUS password_change(const char *remote_mach, - const char *username, + const char *domain, const char *username, const char *old_passwd, const char *new_pw, int local_flags) { @@ -261,7 +261,7 @@ static NTSTATUS password_change(const char *remote_mach, return NT_STATUS_UNSUCCESSFUL; } ret = remote_password_change(remote_mach, - NULL, username, + domain, username, old_passwd, new_pw, &err_str); } else { ret = local_password_change(username, local_flags, new_pw, @@ -466,7 +466,8 @@ static int process_root(int local_flags) } } - if (!NT_STATUS_IS_OK(password_change(remote_machine, user_name, + if (!NT_STATUS_IS_OK(password_change(remote_machine, + NULL, user_name, old_passwd, new_passwd, local_flags))) { result = 1; @@ -566,8 +567,9 @@ static int process_nonroot(int local_flags) exit(1); } - if (!NT_STATUS_IS_OK(password_change(remote_machine, user_name, old_pw, - new_pw, 0))) { + if (!NT_STATUS_IS_OK(password_change(remote_machine, + NULL, user_name, + old_pw, new_pw, 0))) { result = 1; goto done; } |