svn commit: samba r15310 - branches/SAMBA_3_0/source/passdb trunk/source/passdb

jerry at samba.org jerry at samba.org
Fri Apr 28 15:36:24 GMT 2006


Author: jerry
Date: 2006-04-28 15:36:23 +0000 (Fri, 28 Apr 2006)
New Revision: 15310

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15310

Log:
only store lanman passwords on a change if 'lanman auth = yes'
Modified:
   branches/SAMBA_3_0/source/passdb/pdb_get_set.c
   trunk/source/passdb/pdb_get_set.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_get_set.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_get_set.c	2006-04-28 15:35:42 UTC (rev 15309)
+++ branches/SAMBA_3_0/source/passdb/pdb_get_set.c	2006-04-28 15:36:23 UTC (rev 15310)
@@ -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,13 +1016,14 @@
 
 	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);
 }
 

Modified: trunk/source/passdb/pdb_get_set.c
===================================================================
--- trunk/source/passdb/pdb_get_set.c	2006-04-28 15:35:42 UTC (rev 15309)
+++ trunk/source/passdb/pdb_get_set.c	2006-04-28 15:36:23 UTC (rev 15310)
@@ -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,13 +1016,14 @@
 
 	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);
 }
 



More information about the samba-cvs mailing list