[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-1080-g7d9d2de
Michael Adam
obnox at samba.org
Fri Jan 4 21:10:10 GMT 2008
The branch, v3-2-test has been updated
via 7d9d2de39072b3291b95ac3965df0d19f83792b9 (commit)
via 465a3b356cffb855e26569d3752f15cac07208c0 (commit)
via 9e70d1f24dd304c363a1bde97b5af618b46edc49 (commit)
via cafda34783f0961c9b463803c19cfcb69f836e3f (commit)
via 71c3c8ad4c92c5f6267b84ee1d207e5e49e9a4ec (commit)
from 16224e8f4f22a8db0ed278d741a7706967f55335 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 7d9d2de39072b3291b95ac3965df0d19f83792b9
Author: Michael Adam <obnox at samba.org>
Date: Fri Jan 4 22:06:15 2008 +0100
Add a debug message (when the LDAP server has really been connected).
Michael
commit 465a3b356cffb855e26569d3752f15cac07208c0
Author: Michael Adam <obnox at samba.org>
Date: Fri Jan 4 21:56:57 2008 +0100
Untangle assignment and result check.
Michael
commit 9e70d1f24dd304c363a1bde97b5af618b46edc49
Author: Michael Adam <obnox at samba.org>
Date: Fri Jan 4 21:54:02 2008 +0100
Enhance DEBUG-verbosity of ldap_open_with_timeout().
Michael
commit cafda34783f0961c9b463803c19cfcb69f836e3f
Author: Michael Adam <obnox at samba.org>
Date: Fri Jan 4 21:53:25 2008 +0100
Unindent function header.
Michael
commit 71c3c8ad4c92c5f6267b84ee1d207e5e49e9a4ec
Author: Michael Adam <obnox at samba.org>
Date: Fri Jan 4 21:45:28 2008 +0100
Fix a misleading DEBUG message.
At this stage, the (tcp) connection to the LDAP server has not
been established, this is what is about to be attempted. What
has been succesfully done, is a CLDAP netlogon query.
Michael
-----------------------------------------------------------------------
Summary of changes:
source/libads/ldap.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index 843d579..44560c8 100644
--- a/source/libads/ldap.c
+++ b/source/libads/ldap.c
@@ -52,10 +52,14 @@ static void gotalarm_sig(void)
gotalarm = 1;
}
- LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to)
+LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to)
{
LDAP *ldp = NULL;
+
+ DEBUG(10, ("Opening connection to LDAP server '%s:%d', timeout "
+ "%u seconds\n", server, port, to));
+
/* Setup timeout */
gotalarm = 0;
CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
@@ -65,8 +69,10 @@ static void gotalarm_sig(void)
ldp = ldap_open(server, port);
if (ldp == NULL) {
- DEBUG(2,("Could not open LDAP connection to %s:%d: %s\n",
+ DEBUG(2,("Could not open connection to LDAP server %s:%d: %s\n",
server, port, strerror(errno)));
+ } else {
+ DEBUG(10, ("Connected to LDAP server '%s:%d'\n", server, port));
}
/* Teardown timeout. */
@@ -400,7 +406,7 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads)
got_connection:
print_sockaddr(addr, sizeof(addr), &ads->ldap.ss);
- DEBUG(3,("Connected to LDAP server %s\n", addr));
+ DEBUG(3,("Successfully contacted LDAP server %s\n", addr));
if (!ads->auth.user_name) {
/* Must use the userPrincipalName value here or sAMAccountName
@@ -442,11 +448,12 @@ got_connection:
/* Otherwise setup the TCP LDAP session */
- if ( (ads->ldap.ld = ldap_open_with_timeout(ads->config.ldap_server_name,
- LDAP_PORT, lp_ldap_timeout())) == NULL )
- {
+ ads->ldap.ld = ldap_open_with_timeout(ads->config.ldap_server_name,
+ LDAP_PORT, lp_ldap_timeout());
+ if (ads->ldap.ld == NULL) {
return ADS_ERROR(LDAP_OPERATIONS_ERROR);
}
+ DEBUG(3,("Connected to LDAP server %s\n", ads->config.ldap_server_name));
/* cache the successful connection for workgroup and realm */
if (ads_closest_dc(ads)) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list