From: Aaron Spangler Date: Mon, 6 Sep 2004 19:05:32 +0000 (+0000) Subject: Openldap ~/.ldaprc fix X-Git-Tag: SUDO_1_6_8p1~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2102b561babdb0b27db9e84a1c32cdaadbb609ea;p=sudo Openldap ~/.ldaprc fix --- diff --git a/env.c b/env.c index a2a69b362..0f565a921 100644 --- a/env.c +++ b/env.c @@ -150,7 +150,7 @@ zero_env(envp) char **envp; { char **ep, **nep; - static char *newenv[7]; + static char *newenv[8]; extern char *prev_user; for (ep = envp; *ep; ep++) { @@ -198,6 +198,16 @@ zero_env(envp) if (*nep == NULL) *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]); }