summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-05 22:51:57 +0000
committerJeremy Allison <jra@samba.org>2000-10-05 22:51:57 +0000
commit56d514235ed16d3cb6b3682afa6980eb3455c50d (patch)
tree6bdc5b4c1bbbf2df35c791a1ec52271b743f7c51
parenta6f31d68777c2b426f99317390c92b2951b4fa6a (diff)
downloadsamba-56d514235ed16d3cb6b3682afa6980eb3455c50d.tar.gz
samba-56d514235ed16d3cb6b3682afa6980eb3455c50d.tar.bz2
samba-56d514235ed16d3cb6b3682afa6980eb3455c50d.zip
Fix for null passwords being allowed bug.
Jeremy. (This used to be commit d4d55488397832df35b558564c263a307b0bb629)
-rw-r--r--source3/smbd/password.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index da01cf4f37..2f720db9c1 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -514,10 +514,14 @@ BOOL pass_check_smb(char *user, char *domain,
return(False);
}
- if (lm_pwd[0] == '\0' && (smb_pass->acct_ctrl & ACB_PWNOTREQ) && lp_null_passwords())
- {
- DEBUG(3,("Account for user '%s' has no password and null passwords are allowed.\n", smb_pass->smb_name));
- return(True);
+ if (smb_pass->acct_ctrl & ACB_PWNOTREQ) {
+ if (lp_null_passwords()) {
+ DEBUG(3,("Account for user '%s' has no password and null passwords are allowed.\n", smb_pass->smb_name));
+ return(True);
+ } else {
+ DEBUG(3,("Account for user '%s' has no password and null passwords are NOT allowed.\n", smb_pass->smb_name));
+ return(False);
+ }
}
if (smb_password_ok(smb_pass, chal, lm_pwd, nt_pwd))