From 6e807c763fe3a00ddf5435ecb23e81d85ed34378 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 28 Apr 2006 15:36:23 +0000 Subject: r15310: only store lanman passwords on a change if 'lanman auth = yes' (This used to be commit b6904e0950a5e70ebb2ea8aa9e9afc220adbe211) --- source3/passdb/pdb_get_set.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'source3/passdb') 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); } -- cgit