Commit 8c9f0712 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

duplicate string from environment, as it may be overridden by the user (ITS#4436)

parent df2b44c3
......@@ -417,6 +417,12 @@ ldap_int_destroy_global_options(void)
ldap_int_hostname = NULL;
}
#endif
#ifdef HAVE_CYRUS_SASL
if ( gopts->ldo_def_sasl_authcid ) {
LDAP_FREE( gopts->ldo_def_sasl_authcid );
gopts->ldo_def_sasl_authcid = NULL;
}
#endif
}
/*
......@@ -567,7 +573,7 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
if( user == NULL ) user = getenv("LOGNAME");
if( user != NULL ) {
gopts->ldo_def_sasl_authcid = user;
gopts->ldo_def_sasl_authcid = LDAP_STRDUP( user );
}
}
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment