mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-11-21 01:04:44 +08:00
Import ITS#2019 fix from HEAD (gethostbyname mutex init)
This commit is contained in:
parent
07dd4d39f8
commit
1620b1da34
@ -253,7 +253,7 @@ static void openldap_ldap_init_w_userconf(const char *file)
|
||||
if (home != NULL) {
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: HOME env is %s\n",
|
||||
home, 0, 0);
|
||||
path = LDAP_MALLOC(strlen(home) + strlen(file) + 3);
|
||||
path = LDAP_MALLOC(strlen(home) + strlen(file) + sizeof( LDAP_DIRSEP "."));
|
||||
} else {
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: HOME env is NULL\n",
|
||||
0, 0, 0);
|
||||
@ -263,11 +263,11 @@ static void openldap_ldap_init_w_userconf(const char *file)
|
||||
/* we assume UNIX path syntax is used... */
|
||||
|
||||
/* try ~/file */
|
||||
sprintf(path, "%s%s%s", home, LDAP_DIRSEP, file);
|
||||
sprintf(path, "%s" LDAP_DIRSEP "%s", home, file);
|
||||
openldap_ldap_init_w_conf(path, 1);
|
||||
|
||||
/* try ~/.file */
|
||||
sprintf(path, "%s%s.%s", home, LDAP_DIRSEP, file);
|
||||
sprintf(path, "%s" LDAP_DIRSEP ".%s", home, file);
|
||||
openldap_ldap_init_w_conf(path, 1);
|
||||
}
|
||||
|
||||
@ -476,12 +476,12 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
|
||||
}
|
||||
#endif
|
||||
|
||||
ldap_int_utils_init();
|
||||
|
||||
#if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) \
|
||||
|| defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
|
||||
ldap_int_hostname = ldap_pvt_get_fqdn( ldap_int_hostname );
|
||||
#endif
|
||||
ldap_int_utils_init();
|
||||
|
||||
if ( ldap_int_tblsize == 0 )
|
||||
ldap_int_ip_init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user