summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/libsm/errstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail/libsm/errstring.c')
-rw-r--r--contrib/sendmail/libsm/errstring.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/sendmail/libsm/errstring.c b/contrib/sendmail/libsm/errstring.c
index 7233c5a..01d5a64 100644
--- a/contrib/sendmail/libsm/errstring.c
+++ b/contrib/sendmail/libsm/errstring.c
@@ -264,10 +264,12 @@ sm_errstring(errnum)
#if LDAPMAP
/*
- ** LDAP error messages.
+ ** LDAP error messages. Handle small negative errors from
+ ** libldap (in the range -E_LDAP_SHIM to zero, offset by E_LDAPBASE)
+ ** as well.
*/
- if (errnum >= E_LDAPBASE)
+ if (errnum >= E_LDAPBASE - E_LDAP_SHIM)
return ldap_err2string(errnum - E_LDAPBASE);
#endif /* LDAPMAP */
OpenPOWER on IntegriCloud