]> granicus.if.org Git - sudo/commitdiff
Openldap ~/.ldaprc fix
authorAaron Spangler <aaron777@gmail.com>
Mon, 6 Sep 2004 19:05:32 +0000 (19:05 +0000)
committerAaron Spangler <aaron777@gmail.com>
Mon, 6 Sep 2004 19:05:32 +0000 (19:05 +0000)
env.c

diff --git a/env.c b/env.c
index a2a69b362e6e5c41f8d14674216944ded34e27ee..0f565a9215506d97a15309c0404203c2f2820c5b 100644 (file)
--- 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]);
 }