Add missing braces to avoid DYLD_FORCE_FLAT_NAMESPACE being set

unconditionally on darwin.  From Toby Peterson.
This commit is contained in:
Todd C. Miller
2004-12-02 16:18:29 +00:00
parent 77a7ab659a
commit 48dae86b8f

3
env.c
View File

@@ -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)