From ccc45780ac94473eb0c5df8f0873c28fe7d26d28 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 8 Feb 2023 16:47:18 -0700 Subject: Substitute for _PATH_SUDO* variables in pathnames.h. Previously these were hard-coded with Makefile overrides. --- configure | 143 ++++++++++++++++++++++++++++++++++++++++------- configure.ac | 29 +++------- m4/sudo.m4 | 34 ++++++++++- pathnames.h.in | 16 +++--- plugins/sudoers/visudo.c | 2 +- 5 files changed, 174 insertions(+), 50 deletions(-) diff --git a/configure b/configure index 7d997177d..42b67ff44 100755 --- a/configure +++ b/configure @@ -35508,26 +35508,6 @@ while test X"$plugindir" != X"$_plugindir"; do done exec_prefix="$oexec_prefix" -# Convert exampledir to something that can be used in the man pages -# I wish there was a better way to expand this. -EXAMPLES="$exampledir" -while :; do - EXAMPLES="`echo \"$EXAMPLES\" | sed -e 's/(/{/g' -e 's/)/}/g'`" - case "$EXAMPLES" in - *\${[A-Za-z]*}*) - eval EXAMPLES="$EXAMPLES" - ;; - *) - break - ;; - esac -done -case "$EXAMPLES" in - NONE/*) - EXAMPLES="${ac_default_prefix}${EXAMPLES#NONE}" - ;; -esac - if test X"$enable_intercept" != X"no" then : @@ -35632,6 +35612,129 @@ test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var' test "$runstatedir" = '${localstatedir}/run' && runstatedir='$(localstatedir)/run' test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' +# Expand config file paths for use in pathnames.h + + + _sudo_define_path_exp="$cvtsudoers_conf" + while :; do + _sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`" + case "$_sudo_define_path_exp" in + *\${[A-Za-z]*}*) + eval _sudo_define_path_exp="$_sudo_define_path_exp" + ;; + *) + break + ;; + esac +done +case "$_sudo_define_path_exp" in + NONE/*) + _sudo_define_path_exp="${ac_default_prefix}${_sudo_define_path_exp#NONE}" + ;; +esac + + cat >>confdefs.h <>confdefs.h <>confdefs.h <>confdefs.h <