projects
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d4eb88d
)
Two minor tidies to the recent ldap.c changes.
author
Philip Hazel
<ph10@hermes.cam.ac.uk>
Thu, 11 Nov 2004 12:05:54 +0000
(12:05 +0000)
committer
Philip Hazel
<ph10@hermes.cam.ac.uk>
Thu, 11 Nov 2004 12:05:54 +0000
(12:05 +0000)
src/src/lookups/ldap.c
patch
|
blob
|
blame
|
history
diff --git
a/src/src/lookups/ldap.c
b/src/src/lookups/ldap.c
index c4777bc87b363f4d7bf2938425b6738b9a0d3f9c..33016457042ab0e8f4987bf0294f6529a4f7bee9 100644
(file)
--- a/
src/src/lookups/ldap.c
+++ b/
src/src/lookups/ldap.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/lookups/ldap.c,v 1.
2 2004/11/10 14:15:20
ph10 Exp $ */
+/* $Cambridge: exim/src/src/lookups/ldap.c,v 1.
3 2004/11/11 12:05:54
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-129,7
+129,7
@@
Arguments:
password password for authentication, or NULL
sizelimit max number of entries returned, or 0 for no limit
timelimit max time to wait, or 0 for no limit
password password for authentication, or NULL
sizelimit max number of entries returned, or 0 for no limit
timelimit max time to wait, or 0 for no limit
- tcplimit max time
to
connect, or 0 for OS default
+ tcplimit max time
for network activity, e.g.
connect, or 0 for OS default
deference the dereference option, which is one of
LDAP_DEREF_{NEVER,SEARCHING,FINDING,ALWAYS}
deference the dereference option, which is one of
LDAP_DEREF_{NEVER,SEARCHING,FINDING,ALWAYS}
@@
-271,6
+271,15
@@
for (lcp = ldap_connections; lcp != NULL; lcp = lcp->next)
if (ldapi || port == lcp->port) break;
}
if (ldapi || port == lcp->port) break;
}
+/* Use this network timeout in any requests. */
+
+if (tcplimit > 0)
+ {
+ timeout.tv_sec = tcplimit;
+ timeout.tv_usec = 0;
+ timeoutptr = &timeout;
+ }
+
/* If no cached connection found, we must open a connection to the server. If
the server name is actually an absolute path, we set ldapi=TRUE above. This
requests connection via a Unix socket. However, as far as I know, only OpenLDAP
/* If no cached connection found, we must open a connection to the server. If
the server name is actually an absolute path, we set ldapi=TRUE above. This
requests connection via a Unix socket. However, as far as I know, only OpenLDAP
@@
-447,15
+456,6
@@
else
host, porttext);
}
host, porttext);
}
-/* Whatever follows, obey this timeout in any requests. */
-
-if (tcplimit > 0)
- {
- timeout.tv_sec = tcplimit;
- timeout.tv_usec = 0;
- timeoutptr = &timeout;
- }
-
/* Bind with the user/password supplied, or an anonymous bind if these values
are NULL, unless a cached connection is already bound with the same values. */
/* Bind with the user/password supplied, or an anonymous bind if these values
are NULL, unless a cached connection is already bound with the same values. */
@@
-474,7
+474,7
@@
if (!lcp->bound ||
== -1)
{
*errmsg = string_sprintf("failed to bind the LDAP connection to server "
== -1)
{
*errmsg = string_sprintf("failed to bind the LDAP connection to server "
- "%s%s -
LDAP error
", host, porttext);
+ "%s%s -
ldap_bind() returned -1
", host, porttext);
goto RETURN_ERROR;
}
goto RETURN_ERROR;
}