From 80f8960fc67711f80f12820532070acd9be8df97 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 3 May 2017 11:58:40 -0600 Subject: [PATCH] Move the invocation of check_noexec into the main "check" target but only run it if not cross compiling and whe CHECK_NOEXEC is not empty. --- configure | 2 +- configure.ac | 2 +- src/Makefile.in | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/configure b/configure index d4bd09ced..362179b9f 100755 --- a/configure +++ b/configure @@ -26341,7 +26341,7 @@ if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no" -o "$enabled_share # Can't use asan with LD_PRELOAD if test "$enable_asan" != "yes"; then - CHECK_NOEXEC=check_sudo_noexec + CHECK_NOEXEC=check_noexec fi noexec_file="$with_noexec" diff --git a/configure.ac b/configure.ac index 0730eef54..232b2d732 100644 --- a/configure.ac +++ b/configure.ac @@ -4221,7 +4221,7 @@ if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no" -o "$enabled_share # Can't use asan with LD_PRELOAD if test "$enable_asan" != "yes"; then - CHECK_NOEXEC=check_sudo_noexec + CHECK_NOEXEC=check_noexec fi noexec_file="$with_noexec" diff --git a/src/Makefile.in b/src/Makefile.in index 3a6ec60a2..22b62e1d2 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -161,7 +161,7 @@ sudo_noexec.la: libsudo_noexec.la sesh: $(SESH_OBJS) $(LT_LIBS) $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -o $@ $(SESH_OBJS) $(LDFLAGS) $(ASAN_LDFLAGS) $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(LIBS) -check_noexec: $(CHECK_NOEXEC_OBJS) $(top_builddir)/lib/util/libsudo_util.la +check_noexec: $(CHECK_NOEXEC_OBJS) $(top_builddir)/lib/util/libsudo_util.la sudo_noexec.la $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) -o $@ $(CHECK_NOEXEC_OBJS) $(TEST_LDFLAGS) $(ASAN_LDFLAGS) $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(TEST_LIBS) check_ttyname: $(CHECK_TTYNAME_OBJS) $(top_builddir)/lib/util/libsudo_util.la @@ -236,11 +236,9 @@ cppcheck: check: $(TEST_PROGS) @if test X"$(cross_compiling)" != X"yes"; then \ ./check_ttyname; \ - fi - -check_sudo_noexec: sudo_noexec.la check_noexec - @if test X"$(cross_compiling)" != X"yes"; then \ - ./check_noexec .libs/$(noexecfile); \ + if test X"@CHECK_NOEXEC@" != X""; then \ + ./check_noexec .libs/$(noexecfile); \ + fi; \ fi clean: -- 2.40.0