diff options
author | Gerald Carter <jerry@samba.org> | 2006-04-28 15:36:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:16:34 -0500 |
commit | 6e807c763fe3a00ddf5435ecb23e81d85ed34378 (patch) | |
tree | 29d8caac7a7532bf4e9e7178b68200dfb43254c1 /source3/passdb | |
parent | d4a51cc5009ac2794070e8f9b159d17be7af8a47 (diff) | |
download | samba-6e807c763fe3a00ddf5435ecb23e81d85ed34378.tar.gz samba-6e807c763fe3a00ddf5435ecb23e81d85ed34378.tar.bz2 samba-6e807c763fe3a00ddf5435ecb23e81d85ed34378.zip |
r15310: only store lanman passwords on a change if 'lanman auth = yes'
(This used to be commit b6904e0950a5e70ebb2ea8aa9e9afc220adbe211)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_get_set.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index 5cb72e7f86..0b93c42a41 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -3,7 +3,7 @@ struct samu access routines Copyright (C) Jeremy Allison 1996-2001 Copyright (C) Luke Kenneth Casson Leighton 1996-1998 - Copyright (C) Gerald (Jerry) Carter 2000-2001 + Copyright (C) Gerald (Jerry) Carter 2000-2006 Copyright (C) Andrew Bartlett 2001-2002 Copyright (C) Stefan (metze) Metzmacher 2002 @@ -1016,12 +1016,13 @@ BOOL pdb_set_lanman_passwd (struct samu *sampass, const uint8 pwd[LM_HASH_LEN], data_blob_clear_free(&sampass->lm_pw); - if (pwd) { - sampass->lm_pw = - data_blob_talloc(sampass, pwd, LM_HASH_LEN); - } else { - sampass->lm_pw = data_blob(NULL, 0); - } + /* on keep the password if we are allowing LANMAN authentication */ + + if (pwd && lp_lanman_auth() ) { + sampass->lm_pw = data_blob_talloc(sampass, pwd, LM_HASH_LEN); + } else { + sampass->lm_pw = data_blob(NULL, 0); + } return pdb_set_init_flags(sampass, PDB_LMPASSWD, flag); } |