]> granicus.if.org Git - sudo/commitdiff
Avoid building/running the check_symbols test program unless we are
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 8 Aug 2014 17:19:20 +0000 (11:19 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 8 Aug 2014 17:19:20 +0000 (11:19 -0600)
building a shared sudoers plugin.

configure
configure.ac
plugins/sudoers/Makefile.in

index 68470037033705d4d0bf78da74fad6e4b901351e..d9bf38db43bb21cf36ead7942124ae382b49b693 100755 (executable)
--- a/configure
+++ b/configure
@@ -729,6 +729,7 @@ SSP_LDFLAGS
 PIE_CFLAGS
 PIE_LDFLAGS
 CROSS_COMPILING
+SUDOERS_TEST_PROGS
 COMPAT_TEST_PROGS
 LOCALEDIR_SUFFIX
 SUDO_NLS
@@ -2981,6 +2982,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;}
 
 
 
+
 
 
 #
@@ -22060,6 +22062,13 @@ case "$lt_cv_dlopen" in
        ;;
 esac
 
+#
+# The check_symbols test can only succeed with a dynamic sudoers plugin.
+#
+if test X"$STATIC_SUDOERS" = X""; then
+    SUDOERS_TEST_PROGS="${SUDOERS_TEST_PROGS}${SUDOERS_TEST_PROGS+ }check_symbols"
+fi
+
 #
 # We can only disable linking with the shared libsudo_util if
 # sudoers is linked statically too.
index 55729b83e0d0d1eb6006b94f0e0712ffbfa6469e..b8713cbc5328403f344cffa9aca1b09a6fa9c3d7 100644 (file)
@@ -80,6 +80,7 @@ AC_SUBST([LIBMD])
 AC_SUBST([SUDO_NLS])
 AC_SUBST([LOCALEDIR_SUFFIX])
 AC_SUBST([COMPAT_TEST_PROGS])
+AC_SUBST([SUDOERS_TEST_PROGS])
 AC_SUBST([CROSS_COMPILING])
 AC_SUBST([PIE_LDFLAGS])
 AC_SUBST([PIE_CFLAGS])
@@ -3616,6 +3617,13 @@ case "$lt_cv_dlopen" in
        ;;
 esac
 
+#
+# The check_symbols test can only succeed with a dynamic sudoers plugin.
+#
+if test X"$STATIC_SUDOERS" = X""; then
+    SUDOERS_TEST_PROGS="${SUDOERS_TEST_PROGS}${SUDOERS_TEST_PROGS+ }check_symbols"
+fi
+
 #
 # We can only disable linking with the shared libsudo_util if
 # sudoers is linked statically too.
index 0631210b2c501125773760bc710b38b18d81213d..bf0650dcfb0382da0db0f719656d03b1804b93ed 100644 (file)
@@ -131,8 +131,8 @@ SHELL = @SHELL@
 
 PROGS = sudoers.la visudo sudoreplay testsudoers
 
-TEST_PROGS = check_iolog_path check_fill check_wrap check_addr check_symbols \
-            check_digest check_base64
+TEST_PROGS = check_iolog_path check_fill check_wrap check_addr check_digest \
+            check_base64 @SUDOERS_TEST_PROGS@
 
 AUTH_OBJS = sudo_auth.lo @AUTH_OBJS@
 
@@ -227,9 +227,7 @@ check_iolog_path: $(CHECK_IOLOG_PATH_OBJS) $(LT_LIBS)
 
 # We need to link check_symbols with -lpthread on HP-UX since LDAP uses threads
 check_symbols: $(CHECK_SYMBOLS_OBJS) $(LT_LIBS)
-       if [ X"$(shlib_enable)" = X"yes" -a X"@LT_STATIC@" != X"" ]; then \
-           $(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_SYMBOLS_OBJS) $(LDFLAGS) $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(LIBS) @SUDO_LIBS@; \
-       fi
+       $(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_SYMBOLS_OBJS) $(LDFLAGS) $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(LIBS) @SUDO_LIBS@
 
 check_wrap: $(CHECK_WRAP_OBJS) $(LT_LIBS)
        $(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_WRAP_OBJS) $(LDFLAGS) $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(LIBS)
@@ -338,9 +336,9 @@ check: $(TEST_PROGS) visudo testsudoers
            diff regress/parser/check_digest.out $(srcdir)/regress/parser/check_digest.out.ok || rval=`expr $$rval + $$?`; \
            ./check_fill || rval=`expr $$rval + $$?`; \
            ./check_iolog_path $(srcdir)/regress/iolog_path/data || rval=`expr $$rval + $$?`; \
-           if [ X"$(shlib_enable)" = X"yes" -a X"@LT_STATIC@" != X"" ]; then \
-               ./check_symbols .libs/sudoers.so $(shlib_exp) || rval=`expr $$rval + $$?`; \
-           fi; \
+           case "$(TEST_PROGS)" in \
+               *check_symbols*) ./check_symbols .libs/sudoers.so $(shlib_exp) || rval=`expr $$rval + $$?`;; \
+           esac; \
            mkdir -p regress/logging; \
            ./check_wrap $(srcdir)/regress/logging/check_wrap.in > regress/logging/check_wrap.out; \
            diff regress/logging/check_wrap.out $(srcdir)/regress/logging/check_wrap.out.ok || rval=`expr $$rval + $$?`; \