summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-03-31 03:02:40 +0000
committerLuke Leighton <lkcl@samba.org>2000-03-31 03:02:40 +0000
commit7f42e9a7c3ef67030c5efde8ffdf97e67f8daec3 (patch)
treeac1b673f1b410c5968e272e20aed954f3a3467ba
parentcf354472b122f9dc3acc502f8f88d932f2a64fc0 (diff)
downloadsamba-7f42e9a7c3ef67030c5efde8ffdf97e67f8daec3.tar.gz
info printing in pwd change.
-rw-r--r--source/rpcclient/cmd_samr.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c
index 4a2c119e860..d684488ba6b 100644
--- a/source/rpcclient/cmd_samr.c
+++ b/source/rpcclient/cmd_samr.c
@@ -137,8 +137,9 @@ SAM password change
void cmd_sam_ntchange_pwd(struct client_info *info, int argc, char *argv[])
{
fstring srv_name;
- char *new_passwd;
- char *new_passwd2;
+ char *pwd;
+ fstring new_passwd;
+ fstring new_passwd2;
uchar nt_oldhash[16];
uchar lm_oldhash[16];
fstring acct_name;
@@ -174,12 +175,23 @@ void cmd_sam_ntchange_pwd(struct client_info *info, int argc, char *argv[])
nt_oldhash);
}
- new_passwd = (char *)getpass("New Password: ");
- new_passwd2 = (char *)getpass("retype: ");
+ report(out_hnd,"User: %s Domain: %s\n", acct_name, domain);
- if ((new_passwd != NULL && new_passwd2 != NULL &&
- !strequal(new_passwd, new_passwd2)) ||
- (new_passwd != new_passwd2))
+ pwd = (char *)getpass("New Password: ");
+ ZERO_STRUCT(new_passwd);
+ if (pwd != NULL)
+ {
+ fstrcpy(new_passwd, pwd);
+ }
+
+ pwd = (char *)getpass("retype: ");
+ ZERO_STRUCT(new_passwd2);
+ if (pwd != NULL)
+ {
+ fstrcpy(new_passwd2, pwd);
+ }
+
+ if (!strequal(new_passwd, new_passwd2))
{
report(out_hnd, "New passwords differ!\n");
return;