summaryrefslogtreecommitdiff
path: root/source3/libsmb/pwd_cache.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-01-06 08:12:35 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-01-06 08:12:35 +0000
commit7f87b207a72811b0d00945fadafc51559e561828 (patch)
treead7bea94e1c02519e2f7a1755a5b5823de849012 /source3/libsmb/pwd_cache.c
parent3c900cf40b3389d59f0715385e49f490081f86ea (diff)
downloadsamba-7f87b207a72811b0d00945fadafc51559e561828.tar.gz
samba-7f87b207a72811b0d00945fadafc51559e561828.tar.bz2
samba-7f87b207a72811b0d00945fadafc51559e561828.zip
Merge NTLMSSP fixes from 3.0 to HEAD.
Andrew Bartlett (This used to be commit f7d39c787771616ddb015bd77e3e6cd33f0c7a15)
Diffstat (limited to 'source3/libsmb/pwd_cache.c')
-rw-r--r--source3/libsmb/pwd_cache.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/libsmb/pwd_cache.c b/source3/libsmb/pwd_cache.c
index f45832d7d7..7ba6cfc96f 100644
--- a/source3/libsmb/pwd_cache.c
+++ b/source3/libsmb/pwd_cache.c
@@ -45,8 +45,14 @@ static void pwd_make_lm_nt_16(struct pwd_info *pwd, const char *clr)
{
pwd_init(pwd);
- nt_lm_owf_gen(clr, pwd->smb_nt_pwd, pwd->smb_lm_pwd);
- pwd->null_pwd = False;
+ if (!clr) {
+ ZERO_STRUCT(pwd->smb_nt_pwd);
+ ZERO_STRUCT(pwd->smb_lm_pwd);
+ pwd->null_pwd = True;
+ } else {
+ nt_lm_owf_gen(clr, pwd->smb_nt_pwd, pwd->smb_lm_pwd);
+ pwd->null_pwd = False;
+ }
pwd->crypted = False;
}