diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-09-08 18:30:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:37 -0500 |
commit | debfeb8878c08a7ac835a14d163b7fb44f9416fe (patch) | |
tree | 01a7aee0f3b41a01197731850ab920dd2667e251 | |
parent | 17f2560ce690d6ed2cb75d2442e3225a10f27d9c (diff) | |
download | samba-debfeb8878c08a7ac835a14d163b7fb44f9416fe.tar.gz samba-debfeb8878c08a7ac835a14d163b7fb44f9416fe.tar.bz2 samba-debfeb8878c08a7ac835a14d163b7fb44f9416fe.zip |
r2258: Attempt to fix Bug 1715. Not sure if all of ldapsam_compat works now, but this
definitely fixes two segfaults.
Volker
(This used to be commit 270740189995c56c4d0341aeded364efffec86f2)
-rw-r--r-- | source3/lib/smbldap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index e66fb3640c..c4abc8cf1a 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -66,6 +66,7 @@ ATTRIB_MAP_ENTRY attrib_map_v22[] = { { LDAP_ATTR_DOMAIN, "domain" }, { LDAP_ATTR_OBJCLASS, "objectClass" }, { LDAP_ATTR_ACB_INFO, "acctFlags" }, + { LDAP_ATTR_MOD_TIMESTAMP, "modifyTimestamp" }, { LDAP_ATTR_LIST_END, NULL } }; @@ -428,6 +429,12 @@ static BOOL fetch_ldap_pw(char **dn, char** pw) 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 { |