From: Todd C. Miller Date: Mon, 10 Oct 2016 14:38:50 +0000 (-0600) Subject: Need RTLD_NEXT for wordexp() on dlopen() systems. It is missing on AIX 5.1 at least. X-Git-Tag: SUDO_1_8_18p1^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddbbcb9441cf081b14c8331520114d91cdfb6b9d;p=sudo Need RTLD_NEXT for wordexp() on dlopen() systems. It is missing on AIX 5.1 at least. --- diff --git a/src/sudo_noexec.c b/src/sudo_noexec.c index ebd3e5e96..64a8b06e5 100644 --- a/src/sudo_noexec.c +++ b/src/sudo_noexec.c @@ -164,7 +164,7 @@ FN_NAME(popen)(const char *c, const char *t) } INTERPOSE(popen) -#ifdef HAVE_WORDEXP +#if defined(HAVE_WORDEXP) && (defined(RTLD_NEXT) || defined(HAVE_SHL_LOAD) || defined(HAVE___INTERPOSE)) /* * We can't use a wrapper for wordexp(3) since we still want to call * the real wordexp(3) but with WRDE_NOCMD added to the flags argument. @@ -212,7 +212,7 @@ FN_NAME(wordexp)(const char *words, wordexp_t *we, int flags) #endif /* HAVE___INTERPOSE */ } INTERPOSE(wordexp) -#endif /* HAVE_WORDEXP */ +#endif /* HAVE_WORDEXP && (RTLD_NEXT || HAVE_SHL_LOAD || HAVE___INTERPOSE) */ /* * On Linux we can use a seccomp() filter to disable exec.