summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/libsm
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2007-11-05 00:04:21 +0000
committergshapiro <gshapiro@FreeBSD.org>2007-11-05 00:04:21 +0000
commita2b986fa722f9860a6c56bb5cc724b7e2937d1b7 (patch)
treeae6d46e2ddda2d02221479b71fbe8a44dd728c34 /contrib/sendmail/libsm
parentf4998c8d83fc6b77320e4da32d3d75730971e3d4 (diff)
downloadFreeBSD-src-a2b986fa722f9860a6c56bb5cc724b7e2937d1b7.zip
FreeBSD-src-a2b986fa722f9860a6c56bb5cc724b7e2937d1b7.tar.gz
Import sendmail 8.14.2
Diffstat (limited to 'contrib/sendmail/libsm')
-rw-r--r--contrib/sendmail/libsm/ldap.c35
-rw-r--r--contrib/sendmail/libsm/mpeix.c4
2 files changed, 21 insertions, 18 deletions
diff --git a/contrib/sendmail/libsm/ldap.c b/contrib/sendmail/libsm/ldap.c
index 83b7644..252e547 100644
--- a/contrib/sendmail/libsm/ldap.c
+++ b/contrib/sendmail/libsm/ldap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2007 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -11,7 +11,7 @@
#define LDAP_DEPRECATED 1
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: ldap.c,v 1.78 2006/08/30 22:56:59 ca Exp $")
+SM_RCSID("@(#)$Id: ldap.c,v 1.80 2007/10/12 00:19:44 ca Exp $")
#if LDAPMAP
# include <sys/types.h>
@@ -1103,26 +1103,25 @@ sm_ldap_results(lmap, msgid, flags, delim, rpool, result,
if (save_errno != LDAP_SUCCESS)
{
statp = EX_TEMPFAIL;
- if (ret != 0)
+ switch (save_errno)
{
- switch (save_errno)
- {
#ifdef LDAP_SERVER_DOWN
- case LDAP_SERVER_DOWN:
+ case LDAP_SERVER_DOWN:
#endif /* LDAP_SERVER_DOWN */
- case LDAP_TIMEOUT:
- case LDAP_UNAVAILABLE:
+ case LDAP_TIMEOUT:
+ case ETIMEDOUT:
+ case LDAP_UNAVAILABLE:
- /*
- ** server disappeared,
- ** try reopen on next search
- */
+ /*
+ ** server disappeared,
+ ** try reopen on next search
+ */
- statp = EX_RESTART;
- break;
- }
- save_errno += E_LDAPBASE;
+ statp = EX_RESTART;
+ break;
}
+ if (ret != 0)
+ save_errno += E_LDAPBASE;
SM_LDAP_ERROR_CLEANUP();
errno = save_errno;
return statp;
@@ -1272,6 +1271,7 @@ sm_ldap_results(lmap, msgid, flags, delim, rpool, result,
case LDAP_SERVER_DOWN:
#endif /* LDAP_SERVER_DOWN */
case LDAP_TIMEOUT:
+ case ETIMEDOUT:
case LDAP_UNAVAILABLE:
/*
@@ -1370,6 +1370,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);
+# if _FFR_LDAP_NETWORK_TIMEOUT && defined(LDAP_OPT_NETWORK_TIMEOUT)
+ ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &lmap->ldap_networktmo);
+# endif /* _FFR_LDAP_NETWORK_TIMEOUT && defined(LDAP_OPT_NETWORK_TIMEOUT) */
# ifdef LDAP_OPT_RESTART
ldap_set_option(ld, LDAP_OPT_RESTART, LDAP_OPT_ON);
# endif /* LDAP_OPT_RESTART */
diff --git a/contrib/sendmail/libsm/mpeix.c b/contrib/sendmail/libsm/mpeix.c
index 6d9fedc..163dfba 100644
--- a/contrib/sendmail/libsm/mpeix.c
+++ b/contrib/sendmail/libsm/mpeix.c
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: mpeix.c,v 1.6 2002/05/24 20:50:14 gshapiro Exp $")
+SM_RCSID("@(#)$Id: mpeix.c,v 1.7 2007/05/11 18:51:22 gshapiro Exp $")
#ifdef MPE
/*
@@ -506,7 +506,7 @@ sendmail_mpe_emuluid()
** emulated egid if present, else true egid.
*/
-static uid_t sendmail_mpe_egid = -1;
+static gid_t sendmail_mpe_egid = -1;
#undef getegid
gid_t
OpenPOWER on IntegriCloud