svn commit: samba r2259 - in trunk/source/lib: .

vlendec at samba.org vlendec at samba.org
Wed Sep 8 18:30:34 GMT 2004


Author: vlendec
Date: 2004-09-08 18:30:32 +0000 (Wed, 08 Sep 2004)
New Revision: 2259

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/lib&rev=2259&nolog=1

Log:
Attempt to fix Bug 1715. Not sure if all of ldapsam_compat works now, but this
definitely fixes two segfaults.

Volker

Modified:
   trunk/source/lib/smbldap.c


Changeset:
Modified: trunk/source/lib/smbldap.c
===================================================================
--- trunk/source/lib/smbldap.c	2004-09-08 18:30:00 UTC (rev 2258)
+++ trunk/source/lib/smbldap.c	2004-09-08 18:30:32 UTC (rev 2259)
@@ -66,6 +66,7 @@
 	{ LDAP_ATTR_DOMAIN,		"domain"	},
 	{ LDAP_ATTR_OBJCLASS,		"objectClass"	},
 	{ LDAP_ATTR_ACB_INFO,		"acctFlags"	},
+	{ LDAP_ATTR_MOD_TIMESTAMP,	"modifyTimestamp"	},
 	{ LDAP_ATTR_LIST_END,		NULL 		}
 };
 
@@ -450,6 +451,12 @@
 	char oldval[2048]; /* current largest allowed value is mungeddial */
 	BOOL existed;
 
+	if (attribute == NULL) {
+		/* This can actually happen for ldapsam_compat where we for
+		 * example don't have a password history */
+		return;
+	}
+
 	if (existing != NULL) {
 		existed = smbldap_get_single_attribute(ldap_struct, existing, attribute, oldval, sizeof(oldval));
 	} else {



More information about the samba-cvs mailing list