summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-01-17 07:08:21 +0000
committerJeremy Allison <jra@samba.org>1998-01-17 07:08:21 +0000
commit1ea8ceac458501719a055700902d456304c4ee0a (patch)
treeb7e3008831dd6b3b0b280c1c75ad5aa3c6e64296 /source3/passdb
parent4f9674d1c85f2e7293874477ae0da15fee1538c7 (diff)
downloadsamba-1ea8ceac458501719a055700902d456304c4ee0a.tar.gz
samba-1ea8ceac458501719a055700902d456304c4ee0a.tar.bz2
samba-1ea8ceac458501719a055700902d456304c4ee0a.zip
charcnv.c: Added codepage 866 support onto the file system. Patch
from Max Khon <max@iclub.nsu.ru>. chgpasswd.c: Allow old RAP change password to work with encrypted passwords. Samba can now allow Windows 95/NT clients to securely change the Lanman password ! (But not the NT hash - that gets lost). ipc.c: smbdes.c: smbpass.c: Support for the above. server.c: #ifdef'ed out fix for NT redirector bug. util.c: Fix NIS bug with server name. Jeremy. (This used to be commit cd9fad92d0316e5a0007ba3c5668906dc2f011f1)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/smbpass.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index 4109383fb4..188bf1b71d 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -788,12 +788,15 @@ BOOL mod_smbpwd_entry(struct smb_passwd* pwd)
return False;
}
+ /* The following check is wrong - the NT hash is optional. */
+#if 0
if (*p == '*' || *p == 'X')
{
fclose(fp);
pw_file_unlock(lockfd);
return False;
}
+#endif
/* whew. entry is correctly formed. */
@@ -838,19 +841,20 @@ BOOL mod_smbpwd_entry(struct smb_passwd* pwd)
{
sprintf(&ascii_p16[i*2], "%02X", (uchar) pwd->smb_passwd[i]);
}
+ /* Add on the NT md4 hash */
+ ascii_p16[32] = ':';
+ wr_len = 65;
if (pwd->smb_nt_passwd != NULL)
{
- /* Add on the NT md4 hash */
- ascii_p16[32] = ':';
for (i = 0; i < 16; i++)
{
sprintf(&ascii_p16[(i*2)+33], "%02X", (uchar) pwd->smb_nt_passwd[i]);
}
- wr_len = 65;
}
else
{
- wr_len = 32;
+ /* No NT hash - write out an 'invalid' string. */
+ strcpy(&ascii_p16[33], "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
}
#ifdef DEBUG_PASSWORD