mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
ITS#7585 - Windows doesn't support LDAPI
Adjust patch for ITS#7585 as Windows does not have LDAPI support.
This commit is contained in:
parent
4ccd139355
commit
0eed0ccefc
1 changed files with 7 additions and 1 deletions
|
|
@ -389,7 +389,9 @@ ldap_int_sasl_bind(
|
||||||
struct berval ccred = BER_BVNULL;
|
struct berval ccred = BER_BVNULL;
|
||||||
int saslrc, rc;
|
int saslrc, rc;
|
||||||
unsigned credlen;
|
unsigned credlen;
|
||||||
|
#if !defined(_WIN32)
|
||||||
char my_hostname[HOST_NAME_MAX + 1];
|
char my_hostname[HOST_NAME_MAX + 1];
|
||||||
|
#endif
|
||||||
int free_saslhost = 0;
|
int free_saslhost = 0;
|
||||||
|
|
||||||
Debug1( LDAP_DEBUG_TRACE, "ldap_int_sasl_bind: %s\n",
|
Debug1( LDAP_DEBUG_TRACE, "ldap_int_sasl_bind: %s\n",
|
||||||
|
|
@ -452,7 +454,9 @@ ldap_int_sasl_bind(
|
||||||
/* If we don't need to canonicalize just use the host
|
/* If we don't need to canonicalize just use the host
|
||||||
* from the LDAP URI.
|
* from the LDAP URI.
|
||||||
* Always use the result of gethostname() for LDAPI.
|
* Always use the result of gethostname() for LDAPI.
|
||||||
|
* Skip for Windows which doesn't support LDAPI.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(_WIN32)
|
||||||
if (ld->ld_defconn->lconn_server->lud_scheme != NULL &&
|
if (ld->ld_defconn->lconn_server->lud_scheme != NULL &&
|
||||||
strcmp("ldapi", ld->ld_defconn->lconn_server->lud_scheme) == 0) {
|
strcmp("ldapi", ld->ld_defconn->lconn_server->lud_scheme) == 0) {
|
||||||
rc = gethostname(my_hostname, HOST_NAME_MAX + 1);
|
rc = gethostname(my_hostname, HOST_NAME_MAX + 1);
|
||||||
|
|
@ -461,7 +465,9 @@ ldap_int_sasl_bind(
|
||||||
} else {
|
} else {
|
||||||
saslhost = "localhost";
|
saslhost = "localhost";
|
||||||
}
|
}
|
||||||
} else if ( nocanon )
|
} else
|
||||||
|
#endif
|
||||||
|
if ( nocanon )
|
||||||
saslhost = ld->ld_defconn->lconn_server->lud_host;
|
saslhost = ld->ld_defconn->lconn_server->lud_host;
|
||||||
else {
|
else {
|
||||||
saslhost = ldap_host_connected_to( ld->ld_defconn->lconn_sb,
|
saslhost = ldap_host_connected_to( ld->ld_defconn->lconn_sb,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue