From 8fb0cd3c11ec58da9e292fd3acaf77e8d45e1522 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Fri, 23 Oct 1998 15:21:37 +0000 Subject: possible bug in change oem password code: replaced E_P16 and E_md4hash with a call to nt_lm_owf_gen. if this still doesn't get the NT hash generated correctly then there may instead be a bug in mod_smbpwd_entry(). (This used to be commit 1c8c644210870fef7ea3eddf411b01a98f991fcc) --- source3/smbd/chgpasswd.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'source3') diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 59022c80a8..4369573fe8 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -760,19 +760,12 @@ BOOL check_oem_password(char *user, BOOL change_oem_password(struct smb_passwd *smbpw, char *new_passwd, BOOL override) { int ret; - fstring upper_case_new_passwd; uchar new_nt_p16[16]; uchar new_p16[16]; - memset(upper_case_new_passwd, '\0', sizeof(upper_case_new_passwd)); - fstrcpy(upper_case_new_passwd, new_passwd); - strupper(upper_case_new_passwd); - - E_P16((uchar *)upper_case_new_passwd, new_p16); + nt_lm_owf_gen(new_passwd, new_nt_p16, new_p16); smbpw->smb_passwd = new_p16; - - E_md4hash((uchar *) new_passwd, new_nt_p16); smbpw->smb_nt_passwd = new_nt_p16; /* Now write it into the file. */ @@ -780,7 +773,6 @@ BOOL change_oem_password(struct smb_passwd *smbpw, char *new_passwd, BOOL overri ret = mod_smbpwd_entry(smbpw,override); unbecome_root(0); - memset(upper_case_new_passwd, '\0', strlen(upper_case_new_passwd)); memset(new_passwd, '\0', strlen(new_passwd)); return ret; -- cgit