mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-07 23:51:21 -05:00
Added LDAP_LOG messages
This commit is contained in:
parent
3921e1b0c2
commit
171281f3ec
1 changed files with 44 additions and 0 deletions
|
|
@ -115,7 +115,12 @@ static void openldap_ldap_init_w_conf(
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
|
||||
"openldap_init_w_conf: trying %s\n", file ));
|
||||
#else
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: trying %s\n", file, 0, 0);
|
||||
#endif
|
||||
|
||||
fp = fopen(file, "r");
|
||||
if(fp == NULL) {
|
||||
|
|
@ -123,7 +128,12 @@ static void openldap_ldap_init_w_conf(
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
|
||||
"openldap_init_w_conf: using %s\n", file ));
|
||||
#else
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: using %s\n", file, 0, 0);
|
||||
#endif
|
||||
|
||||
while((start = fgets(linebuf, sizeof(linebuf), fp)) != NULL) {
|
||||
/* skip lines starting with '#' */
|
||||
|
|
@ -251,12 +261,22 @@ static void openldap_ldap_init_w_userconf(const char *file)
|
|||
home = getenv("HOME");
|
||||
|
||||
if (home != NULL) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "init", LDAP_LEVEL_ARGS,
|
||||
"openldap_init_w_userconf: HOME env is %s\n", home ));
|
||||
#else
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: HOME env is %s\n",
|
||||
home, 0, 0);
|
||||
#endif
|
||||
path = LDAP_MALLOC(strlen(home) + strlen(file) + 3);
|
||||
} else {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "init", LDAP_LEVEL_ARGS,
|
||||
"openldap_init_w_userconf: HOME env is NULL\n" ));
|
||||
#else
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: HOME env is NULL\n",
|
||||
0, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
if(home != NULL && path != NULL) {
|
||||
|
|
@ -534,26 +554,50 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
|
|||
char *altfile = getenv(LDAP_ENV_PREFIX "CONF");
|
||||
|
||||
if( altfile != NULL ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
|
||||
"openldap_init_w_userconf: %sCONF env is %s\n",
|
||||
LDAP_ENV_PREFIX, altfile ));
|
||||
#else
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: %s env is %s\n",
|
||||
LDAP_ENV_PREFIX "CONF", altfile, 0);
|
||||
#endif
|
||||
openldap_ldap_init_w_sysconf( altfile );
|
||||
}
|
||||
else
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
|
||||
"openldap_init_w_userconf: %sCONF env is NULL\n",
|
||||
LDAP_ENV_PREFIX ));
|
||||
#else
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: %s env is NULL\n",
|
||||
LDAP_ENV_PREFIX "CONF", 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
{
|
||||
char *altfile = getenv(LDAP_ENV_PREFIX "RC");
|
||||
|
||||
if( altfile != NULL ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
|
||||
"openldap_init_w_userconf: %sRC env is %s\n",
|
||||
LDAP_ENV_PREFIX, altfile ));
|
||||
#else
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: %s env is %s\n",
|
||||
LDAP_ENV_PREFIX "RC", altfile, 0);
|
||||
#endif
|
||||
openldap_ldap_init_w_userconf( altfile );
|
||||
}
|
||||
else
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG (( "init", LDAP_LEVEL_DETAIL1,
|
||||
"openldap_init_w_userconf: %sRC env is NULL\n",
|
||||
LDAP_ENV_PREFIX ));
|
||||
#else
|
||||
Debug(LDAP_DEBUG_TRACE, "ldap_init: %s env is NULL\n",
|
||||
LDAP_ENV_PREFIX "RC", 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
openldap_ldap_init_w_env(gopts, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue