diff options
author | Luke Leighton <lkcl@samba.org> | 1998-10-02 18:45:07 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-10-02 18:45:07 +0000 |
commit | a4e7cc3e46b713aa0ae55de74a1c70921bef578d (patch) | |
tree | 2f494f9bf31de3debf232e9d143b6230c52ea8a3 /source/utils | |
parent | a69ed7846a1e1403ea51d76d6962b97e8c768b29 (diff) | |
download | samba-a4e7cc3e46b713aa0ae55de74a1c70921bef578d.tar.gz samba-a4e7cc3e46b713aa0ae55de74a1c70921bef578d.tar.xz samba-a4e7cc3e46b713aa0ae55de74a1c70921bef578d.zip |
- static function "create_new_hashes" was identical to "nt_lm_owf_gen".
create_new_hashes didn't zero the buffer for the md4hash: nt_lm_owf_gen
did, because jeremy sorted this out a couple of days ago. call
nt_lm_owf_gen instead.
- call SMBOWFencrypt from SMBencrypt and SMBNTencrypt.
- added #ifdef DEBUG_PASSWORD debug password calls.
Diffstat (limited to 'source/utils')
-rw-r--r-- | source/utils/smbpasswd.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index e5e5424a2b8..5ea08542302 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -114,27 +114,6 @@ unable to join domain.\n", prog_name); } /************************************************************* - Utility function to create password hashes. -*************************************************************/ - -static void create_new_hashes( char *new_passwd, uchar *new_p16, uchar *new_nt_p16) -{ - memset(new_nt_p16, '\0', 16); - E_md4hash((uchar *) new_passwd, new_nt_p16); - - /* Mangle the password into Lanman format */ - new_passwd[14] = '\0'; - strupper(new_passwd); - - /* - * Calculate the SMB (lanman) hash functions of the new password. - */ - - memset(new_p16, '\0', 16); - E_P16((uchar *) new_passwd, new_p16); -} - -/************************************************************* Utility function to prompt for new password. *************************************************************/ @@ -555,7 +534,7 @@ int main(int argc, char **argv) /* Calculate the MD4 hash (NT compatible) of the new password. */ - create_new_hashes( new_passwd, new_p16, new_nt_p16); + nt_lm_owf_gen( new_passwd, new_nt_p16, new_p16); /* * Open the smbpaswd file. @@ -634,7 +613,7 @@ int main(int argc, char **argv) else if (enable_user) { if(smb_pwent->smb_passwd == NULL) { prompt_for_new_password(new_passwd); - create_new_hashes( new_passwd, new_p16, new_nt_p16); + nt_lm_owf_gen( new_passwd, new_nt_p16, new_p16); smb_pwent->smb_passwd = new_p16; smb_pwent->smb_nt_passwd = new_nt_p16; } |