mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Bail out early if null passwords and lp_null_passwords not set.
Jeremy.
(This used to be commit 7c718fc85e
)
This commit is contained in:
parent
85cab6559e
commit
bcdb9496e8
@ -586,6 +586,11 @@ return True if the password is correct, False otherwise
|
||||
****************************************************************************/
|
||||
BOOL password_ok(char *user, char *password, int pwlen, struct passwd *pwd)
|
||||
{
|
||||
if ((pwlen == 0) && !lp_null_passwords()) {
|
||||
DEBUG(4,("Null passwords not allowed.\n"));
|
||||
return False;
|
||||
}
|
||||
|
||||
if (pwlen == 24 || (lp_encrypted_passwords() && (pwlen == 0) && lp_null_passwords()))
|
||||
{
|
||||
/* if 24 bytes long assume it is an encrypted password */
|
||||
|
Loading…
Reference in New Issue
Block a user