]> granicus.if.org Git - sudo/commitdiff
Add missing braces to avoid DYLD_FORCE_FLAT_NAMESPACE being set
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 2 Dec 2004 16:18:29 +0000 (16:18 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 2 Dec 2004 16:18:29 +0000 (16:18 +0000)
unconditionally on darwin.  From Toby Peterson.

env.c

diff --git a/env.c b/env.c
index 2e13a33968feaf365399827a4c63993b50f2513c..40286b918a09a84997bdcddea5093d3a6c8caace 100644 (file)
--- a/env.c
+++ b/env.c
@@ -493,7 +493,7 @@ rebuild_env(envp, sudo_mode, noexec)
      * http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html
      * XXX - should prepend to original value, if any
      */
-    if (noexec && def_noexec_file != NULL)
+    if (noexec && def_noexec_file != NULL) {
 #if defined(__darwin__) || defined(__APPLE__)
        insert_env(format_env("DYLD_INSERT_LIBRARIES", def_noexec_file, VNULL), 1);
        insert_env(format_env("DYLD_FORCE_FLAT_NAMESPACE", VNULL), 1);
@@ -504,6 +504,7 @@ rebuild_env(envp, sudo_mode, noexec)
        insert_env(format_env("LD_PRELOAD", def_noexec_file, VNULL), 1);
 # endif
 #endif
+    }
 
     /* Set PS1 if SUDO_PS1 is set. */
     if (ps1)