/* $OpenLDAP$ */
/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
#include "portable.h"
Debug(LDAP_DEBUG_TRACE, "ldap_init: HOME env is %s\n",
home, 0, 0);
#endif
- path = LDAP_MALLOC(strlen(home) + strlen(file) + 3);
+ path = LDAP_MALLOC(strlen(home) + strlen(file) + sizeof( LDAP_DIRSEP "."));
} else {
#ifdef NEW_LOGGING
LDAP_LOG ( CONFIG, ARGS, "openldap_init_w_userconf: HOME env is NULL\n",
/* 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);
}
ldap_int_error_init();
+ ldap_int_utils_init();
+
#ifdef HAVE_WINSOCK2
{ WORD wVersionRequested;
WSADATA wsaData;
|| 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();