From: Todd C. Miller Date: Wed, 3 Jul 2019 19:13:04 +0000 (-0600) Subject: Use $libexecdir in default settings used by the documentation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=caceced2f5d0067112e32dd687ee72ce9b3de37e;p=sudo Use $libexecdir in default settings used by the documentation. The web and pdf pages will substitute /usr/local/libexec for $noexec_file. Also do substitution of variables using exec_prefix even if we don't use them in the Makefile since the documentation may reference them. --- diff --git a/configure b/configure index ecdd8bff0..f6664a92a 100755 --- a/configure +++ b/configure @@ -3117,13 +3117,13 @@ path_info=on ldap_conf=/etc/ldap.conf ldap_secret=/etc/ldap.secret netsvc_conf=/etc/netsvc.conf -noexec_file=/usr/local/libexec/sudo/sudo_noexec.so -sesh_file=/usr/local/libexec/sudo/sesh +noexec_file="$libexecdir/sudo/sudo_noexec.so" +sesh_file="$libexecdir/sudo/sesh" nsswitch_conf=/etc/nsswitch.conf secure_path="not set" pam_session=on pam_login_service=sudo -PLUGINDIR=/usr/local/libexec/sudo +PLUGINDIR="$libexecdir/sudo" DIGEST=digest.lo devsearch="/dev/pts:/dev/vt:/dev/term:/dev/zcons:/dev/pty:/dev" # @@ -6031,12 +6031,13 @@ fi # Check whether --with-plugindir was given. if test "${with_plugindir+set}" = set; then : withval=$with_plugindir; case $with_plugindir in - no) as_fn_error $? "\"illegal argument: --without-plugindir.\"" "$LINENO" 5 + yes) as_fn_error $? "\"must give --with-plugindir an argument.\"" "$LINENO" 5 + ;; + no) as_fn_error $? "\"--without-plugindir not supported.\"" "$LINENO" 5 + ;; + *) PLUGINDIR="$with_plugindir" ;; - *) ;; esac -else - with_plugindir="$libexecdir/sudo" fi @@ -15189,19 +15190,19 @@ $as_echo_n "checking path to sudo_noexec.so... " >&6; } # Check whether --with-noexec was given. if test "${with_noexec+set}" = set; then : withval=$with_noexec; case $with_noexec in - yes) with_noexec="$libexecdir/sudo/sudo_noexec.so" - ;; + yes) ;; no) ;; - *) ;; + *) noexec_file="$with_noexec" + ;; esac else - with_noexec="$libexecdir/sudo/sudo_noexec.so" + with_noexec="$noexec_file" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_noexec" >&5 $as_echo "$with_noexec" >&6; } NOEXECFILE="sudo_noexec.so" -NOEXECDIR="`echo $with_noexec|sed -e 's:^${\([^}]*\)}:$(\1):' -e 's:^\(.*\)/[^/]*:\1:'`" +NOEXECDIR="`echo $noexec_file|sed -e 's:^${\([^}]*\)}:$(\1):' -e 's:^\(.*\)/[^/]*:\1:'`" # Extract the first word of "uname", so it can be a program name with args. set dummy uname; ac_word=$2 @@ -16454,7 +16455,7 @@ if test X"$enable_pvs_studio" = X"yes"; then EOF fi -if test -n "$with_noexec"; then +if test X"$with_noexec" != X"no"; then cat >>confdefs.h <>confdefs.h <>confdefs.h <>confdefs.h <>confdefs.h + cat >>confdefs.h <>confdefs.h <>confdefs.h <>confdefs.h <>confdefs.h <>confdefs.h + +else cat >>confdefs.h <