]> granicus.if.org Git - sudo/commitdiff
Do exec_prefix expansion when enable_shared even if noexec is
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 2 Apr 2013 16:25:54 +0000 (12:25 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 2 Apr 2013 16:25:54 +0000 (12:25 -0400)
not enabled.

configure
configure.in

index 40d938779a0685df02e46dd2f7ad5cfe7c6389c4..28259c5ad2e572c76ca4f47e46faa7082e0e948e 100755 (executable)
--- a/configure
+++ b/configure
@@ -21302,7 +21302,7 @@ CROSS_COMPILING="$cross_compiling"
 
 test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
 
-if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
+if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no" -o "$enabled_shared" != X"no"; then
     oexec_prefix="$exec_prefix"
     if test "$exec_prefix" = '$(prefix)'; then
        if test "$prefix" = "NONE"; then
@@ -21338,20 +21338,22 @@ EOF
 EOF
 
     fi
-    PLUGINDIR="$with_plugindir"
-    _PLUGINDIR=
-    while test X"$PLUGINDIR" != X"$_PLUGINDIR"; do
-       _PLUGINDIR="$PLUGINDIR"
-       eval PLUGINDIR="$_PLUGINDIR"
-    done
-    cat >>confdefs.h <<EOF
+    if test X"$enable_shared" != X"no"; then
+       PLUGINDIR="$with_plugindir"
+       _PLUGINDIR=
+       while test X"$PLUGINDIR" != X"$_PLUGINDIR"; do
+           _PLUGINDIR="$PLUGINDIR"
+           eval PLUGINDIR="$_PLUGINDIR"
+       done
+       cat >>confdefs.h <<EOF
 #define _PATH_SUDO_PLUGIN_DIR "$PLUGINDIR/"
 EOF
 
-    cat >>confdefs.h <<EOF
+       cat >>confdefs.h <<EOF
 #define SUDOERS_PLUGIN "sudoers.so"
 EOF
 
+    fi
     exec_prefix="$oexec_prefix"
 fi
 if test X"$with_selinux" = X"no"; then
index 3eb4e42a5797ac73b280e95dd04e37cce4b32b97..ccc4c9387e38f76584153dad9e95f30a00b4f1e9 100644 (file)
@@ -3537,7 +3537,7 @@ dnl
 dnl Defer setting _PATH_SUDO_NOEXEC until after exec_prefix is set
 dnl XXX - this is gross!
 dnl
-if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
+if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no" -o "$enabled_shared" != X"no"; then
     oexec_prefix="$exec_prefix"
     if test "$exec_prefix" = '$(prefix)'; then
        if test "$prefix" = "NONE"; then
@@ -3567,14 +3567,16 @@ if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
        done
        SUDO_DEFINE_UNQUOTED(_PATH_SUDO_SESH, "$sesh_file")
     fi
-    PLUGINDIR="$with_plugindir"
-    _PLUGINDIR=
-    while test X"$PLUGINDIR" != X"$_PLUGINDIR"; do
-       _PLUGINDIR="$PLUGINDIR"
-       eval PLUGINDIR="$_PLUGINDIR"
-    done
-    SUDO_DEFINE_UNQUOTED(_PATH_SUDO_PLUGIN_DIR, "$PLUGINDIR/")
-    SUDO_DEFINE_UNQUOTED(SUDOERS_PLUGIN, "sudoers.so")
+    if test X"$enable_shared" != X"no"; then
+       PLUGINDIR="$with_plugindir"
+       _PLUGINDIR=
+       while test X"$PLUGINDIR" != X"$_PLUGINDIR"; do
+           _PLUGINDIR="$PLUGINDIR"
+           eval PLUGINDIR="$_PLUGINDIR"
+       done
+       SUDO_DEFINE_UNQUOTED(_PATH_SUDO_PLUGIN_DIR, "$PLUGINDIR/")
+       SUDO_DEFINE_UNQUOTED(SUDOERS_PLUGIN, "sudoers.so")
+    fi
     exec_prefix="$oexec_prefix"
 fi
 if test X"$with_selinux" = X"no"; then