Re: svn commit: samba r18025 - in branches/SAMBA_4_0/source/libcli/ldap: .

2006-09-04 Thread simo
On Mon, 2006-09-04 at 03:59 +, [EMAIL PROTECTED] wrote:
> Author: abartlet
> Date: 2006-09-04 03:59:04 + (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://).

Shouldn't we try use localhost or (hostname -f) here?

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: [EMAIL PROTECTED]
http://samba.org



svn commit: samba r18025 - in branches/SAMBA_4_0/source/libcli/ldap: .

2006-09-03 Thread abartlet
Author: abartlet
Date: 2006-09-04 03:59:04 + (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");