mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
duplicate string from environment, as it may be overridden by the user (ITS#4436)
This commit is contained in:
parent
df2b44c3b9
commit
8c9f071238
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue