X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Finit.c;h=e05ade2d4cbb86f1c62219b9e90b1abf4e51d06e;hb=2b0819c4a9209784f762ec154ce4721038522a8a;hp=227617704cb96ff7a2fea78d6138a628bbb20e99;hpb=75c73317434eede956b13551a674149776e49d04;p=openldap diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index 227617704c..e05ade2d4c 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -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", home, file); + sprintf(path, "%s%s%s", home, LDAP_DIRSEP, file); openldap_ldap_init_w_conf(path, 1); /* try ~/.file */ - sprintf(path, "%s/.%s", home, file); + sprintf(path, "%s%s.%s", home, LDAP_DIRSEP, file); openldap_ldap_init_w_conf(path, 1); } @@ -459,8 +459,7 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl ) if( user == NULL ) user = getenv("LOGNAME"); if( user != NULL ) { - /* this value is leaked, need at_exit() handler */ - gopts->ldo_def_sasl_authcid = LDAP_STRDUP( user ); + gopts->ldo_def_sasl_authcid = user; } } #endif