svn commit: samba r18025 - in
branches/SAMBA_4_0/source/libcli/ldap: .
abartlet at samba.org
abartlet at samba.org
Mon Sep 4 03:59:04 GMT 2006
Author: abartlet
Date: 2006-09-04 03:59:04 +0000 (Mon, 04 Sep 2006)
New Revision: 18025
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18025
Log:
Don't try to set a target host if there isn't one (such as with ldapi://).
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c
Changeset:
Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c 2006-09-04 01:59:23 UTC (rev 18024)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c 2006-09-04 03:59:04 UTC (rev 18025)
@@ -236,11 +236,13 @@
goto failed;
}
- status = gensec_set_target_hostname(conn->gensec, conn->host);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(1, ("Failed to set GENSEC target hostname: %s\n",
- nt_errstr(status)));
- goto failed;
+ if (conn->host) {
+ status = gensec_set_target_hostname(conn->gensec, conn->host);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("Failed to set GENSEC target hostname: %s\n",
+ nt_errstr(status)));
+ goto failed;
+ }
}
status = gensec_set_target_service(conn->gensec, "ldap");
More information about the samba-cvs
mailing list