diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-05-25 08:24:24 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-05-25 08:24:24 +0000 |
commit | ba0b423dfa02b57d66a41ba0cf7dffad00ee19d1 (patch) | |
tree | 885515b8b6c0d63ec26efe9acd395d88bd4adcba /source3/libsmb/clirap.c | |
parent | 20efe2fe6cbc4b5cf861a3296e29f5495637f79c (diff) | |
download | samba-ba0b423dfa02b57d66a41ba0cf7dffad00ee19d1.tar.gz samba-ba0b423dfa02b57d66a41ba0cf7dffad00ee19d1.tar.bz2 samba-ba0b423dfa02b57d66a41ba0cf7dffad00ee19d1.zip |
Update some of the LM hash code to better respect the seperation between
unix and DOS strings.
This pushes all the 'have to uppercase, must be 14 chars' stuff behind the
the interface.
Andrew Bartlett
(This used to be commit dec650efa8ab1466114c2e6d469320a319499ea0)
Diffstat (limited to 'source3/libsmb/clirap.c')
-rw-r--r-- | source3/libsmb/clirap.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index a2b6c8bb8b..3eb9586a67 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -283,8 +283,6 @@ BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char char param[16+sizeof(fstring)]; char data[532]; char *p = param; - fstring upper_case_old_pw; - fstring upper_case_new_pw; unsigned char old_pw_hash[16]; unsigned char new_pw_hash[16]; int data_len; @@ -316,9 +314,7 @@ BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char * Get the Lanman hash of the old password, we * use this as the key to make_oem_passwd_hash(). */ - memset(upper_case_old_pw, '\0', sizeof(upper_case_old_pw)); - clistr_push(cli, upper_case_old_pw, old_password, -1,STR_TERMINATE|STR_UPPER|STR_ASCII); - E_P16((uchar *)upper_case_old_pw, old_pw_hash); + E_deshash(old_password, old_pw_hash); clistr_push(cli, dos_new_password, new_password, -1, STR_TERMINATE|STR_ASCII); @@ -328,10 +324,7 @@ BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char /* * Now place the old password hash in the data. */ - memset(upper_case_new_pw, '\0', sizeof(upper_case_new_pw)); - clistr_push(cli, upper_case_new_pw, new_password, -1, STR_TERMINATE|STR_UPPER|STR_ASCII); - - E_P16((uchar *)upper_case_new_pw, new_pw_hash); + E_deshash(new_password, new_pw_hash); E_old_pw_hash( new_pw_hash, old_pw_hash, (uchar *)&data[516]); |