summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-23 15:21:37 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-23 15:21:37 +0000
commit8fb0cd3c11ec58da9e292fd3acaf77e8d45e1522 (patch)
treeb2655ce1fad6ee98b4baa288e2c7ad1ae6dfb0a0
parenta0991ee87bdfdf66850114bc04cdd577ef87d000 (diff)
downloadsamba-8fb0cd3c11ec58da9e292fd3acaf77e8d45e1522.tar.gz
samba-8fb0cd3c11ec58da9e292fd3acaf77e8d45e1522.tar.bz2
samba-8fb0cd3c11ec58da9e292fd3acaf77e8d45e1522.zip
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)
-rw-r--r--source3/smbd/chgpasswd.c10
1 files changed, 1 insertions, 9 deletions
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;