From: Todd C. Miller Date: Wed, 31 Jan 2007 15:00:48 +0000 (+0000) Subject: Add NOEXEC support for AIX 5.3 which supports LDR_PRELOAD and X-Git-Tag: SUDO_1_7_0~584 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf500a00d65afe569bfa57b21373b44ae1bc93d6;p=sudo Add NOEXEC support for AIX 5.3 which supports LDR_PRELOAD and LDR_PRELOAD64. The 64-bit version is not currently supported. Remove zero_env() prototype as it no longer exists. --- diff --git a/env.c b/env.c index 452abf7d5..fce2d8ce5 100644 --- a/env.c +++ b/env.c @@ -96,7 +96,6 @@ struct environment { * Prototypes */ char **rebuild_env __P((char **, int, int)); -char **zero_env __P((char **)); static void insert_env __P((char *, struct environment *, int)); static char *format_env __P((char *, ...)); @@ -118,8 +117,9 @@ static const char *initial_badenv_table[] = { "SHLIB_PATH", #endif /* __hpux */ #ifdef _AIX + "LDR_*", "LIBPATH", -#endif /* _AIX */ +#endif #ifdef __APPLE__ "DYLD_*", #endif @@ -483,9 +483,13 @@ rebuild_env(envp, sudo_mode, noexec) insert_env(format_env("_RLD_LIST", def_noexec_file, ":DEFAULT", VNULL), &env, 1); # else +# ifdef _AIX + insert_env(format_env("LDR_PRELOAD", def_noexec_file, VNULL), &env, 1); +# else insert_env(format_env("LD_PRELOAD", def_noexec_file, VNULL), &env, 1); -# endif -#endif +# endif /* _AIX */ +# endif /* __osf__ || __sgi */ +#endif /* __darwin__ || __APPLE__ */ } /* Set PS1 if SUDO_PS1 is set. */