Openldap ~/.ldaprc fix
This commit is contained in:
12
env.c
12
env.c
@@ -150,7 +150,7 @@ zero_env(envp)
|
|||||||
char **envp;
|
char **envp;
|
||||||
{
|
{
|
||||||
char **ep, **nep;
|
char **ep, **nep;
|
||||||
static char *newenv[7];
|
static char *newenv[8];
|
||||||
extern char *prev_user;
|
extern char *prev_user;
|
||||||
|
|
||||||
for (ep = envp; *ep; ep++) {
|
for (ep = envp; *ep; ep++) {
|
||||||
@@ -198,6 +198,16 @@ zero_env(envp)
|
|||||||
if (*nep == NULL)
|
if (*nep == NULL)
|
||||||
*nep++ = *ep;
|
*nep++ = *ep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LDAP
|
||||||
|
/*
|
||||||
|
* Prevent OpenLDAP from reading any user dotfiles
|
||||||
|
* or files in the current directory.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
*nep++ = "LDAPNOINIT=1";
|
||||||
|
#endif
|
||||||
|
|
||||||
return(&newenv[0]);
|
return(&newenv[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user