From 39e311b2e17a53f7ed02fcbe3820ca77b65486d5 Mon Sep 17 00:00:00 2001 From: gshapiro Date: Wed, 28 Aug 2002 17:57:52 +0000 Subject: Import sendmail 8.12.6 --- contrib/sendmail/libsm/ldap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'contrib/sendmail/libsm/ldap.c') diff --git a/contrib/sendmail/libsm/ldap.c b/contrib/sendmail/libsm/ldap.c index 3e85a87..bc426a0 100644 --- a/contrib/sendmail/libsm/ldap.c +++ b/contrib/sendmail/libsm/ldap.c @@ -8,7 +8,7 @@ */ #include -SM_RCSID("@(#)$Id: ldap.c,v 1.44 2002/02/22 21:54:02 gshapiro Exp $") +SM_RCSID("@(#)$Id: ldap.c,v 1.44.2.2 2002/08/09 22:23:12 gshapiro Exp $") #if LDAPMAP # include @@ -888,7 +888,8 @@ sm_ldap_results(lmap, msgid, flags, delim, rpool, result, for (i = 0; vals[i] != NULL; i++) { - if (*resultln > 0) + if (*resultln > 0 && + p < pe) *p++ = (char) delim; if (lmap->ldap_attrsep != '\0') @@ -1162,6 +1163,9 @@ sm_ldap_setopts(ld, lmap) ldap_set_option(ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF); ldap_set_option(ld, LDAP_OPT_SIZELIMIT, &lmap->ldap_sizelimit); ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &lmap->ldap_timelimit); +# ifdef LDAP_OPT_RESTART + ldap_set_option(ld, LDAP_OPT_RESTART, LDAP_OPT_ON); +# endif /* LDAP_OPT_RESTART */ # else /* USE_LDAP_SET_OPTION */ /* From here on in we can use ldap internal timelimits */ ld->ld_deref = lmap->ldap_deref; -- cgit v1.1