mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
r18025: Don't try to set a target host if there isn't one (such as with ldapi://).
Andrew Bartlett (This used to be commit 556a21faeed0b6e3cc6efcfa8e0939b151a802de)
This commit is contained in:
parent
e21e8379a2
commit
556aab78a0
@ -236,11 +236,13 @@ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, struct cli_credentials *cr
|
||||
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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user