Add adminconfdir and --enable-adminconf to set it.

Configuration paths in sudo are now a colon-separated list of files
with the adminconfdir instance first (if enabled), followed by a
sysconfdir instance.
This commit is contained in:
Todd C. Miller
2023-05-02 10:37:39 -06:00
parent 9ad6dfa371
commit d4c6ef1222
19 changed files with 275 additions and 64 deletions

View File

@@ -110,7 +110,8 @@ Defaults are listed in brackets after the description.
Install plugins and helper programs in DIR/sudo [PREFIX/libexec/sudo] Install plugins and helper programs in DIR/sudo [PREFIX/libexec/sudo]
--sysconfdir=DIR --sysconfdir=DIR
Look for `sudo.conf` and `sudoers` files in DIR. [/etc] Look for configuration files such as `sudo.conf` and `sudoers`
in DIR. [/etc]
--includedir=DIR --includedir=DIR
Install sudo_plugin.h include file in DIR [PREFIX/include] Install sudo_plugin.h include file in DIR [PREFIX/include]
@@ -358,6 +359,15 @@ Defaults are listed in brackets after the description.
### Optional features: ### Optional features:
--enable-adminconf=[DIR]
Search for configuration files in adminconfdir (PREFIX/etc
by default) in preference to configuration files in sysconfdir
(/etc by default). This can be used on systems where
sysconfdir is located on a read-only filesystem. When this
option is enabled, the visudo utility will store edited
sudoers files in adminconfdir if the original was located
in sysconfdir.
--disable-root-mailer --disable-root-mailer
By default sudo will run the mailer as root when tattling By default sudo will run the mailer as root when tattling
on a user so as to prevent that user from killing the mailer. on a user so as to prevent that user from killing the mailer.

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2010-2015, 2017-2022 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2010-2015, 2017-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -31,6 +31,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
includedir = @includedir@ includedir = @includedir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@

190
configure vendored
View File

@@ -789,6 +789,7 @@ PYTHON_PLUGIN
SIGNAME SIGNAME
devsearch devsearch
DIGEST DIGEST
adminconfdir
exampledir exampledir
TMPFILES_D TMPFILES_D
COMPAT_EXP COMPAT_EXP
@@ -1050,6 +1051,7 @@ enable_openssl_pkgconfig_template
enable_wolfssl enable_wolfssl
enable_gcrypt enable_gcrypt
enable_python enable_python
enable_adminconf
enable_shared enable_shared
enable_static enable_static
with_pic with_pic
@@ -1770,6 +1772,9 @@ Optional Features:
--enable-wolfssl Use wolfSSL's TLS and sha2 functions --enable-wolfssl Use wolfSSL's TLS and sha2 functions
--enable-gcrypt Use GNU crypt's sha2 functions --enable-gcrypt Use GNU crypt's sha2 functions
--enable-python Compile python plugin support --enable-python Compile python plugin support
--enable-adminconf[=DIR]
Use configuration files from adminconfdir in
preference to sysconfdir
--enable-shared[=PKGS] build shared libraries [default=yes] --enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS] --enable-fast-install[=PKGS]
@@ -3623,6 +3628,7 @@ PRELOAD_MODULE='-module'
LDAP='#' LDAP='#'
SUDO_NLS=disabled SUDO_NLS=disabled
exampledir='$(docdir)/examples' exampledir='$(docdir)/examples'
adminconfdir='$(prefix)/etc'
PYTHON_PLUGIN='#' PYTHON_PLUGIN='#'
LOGSRV_SRC='lib/logsrv' LOGSRV_SRC='lib/logsrv'
LOGSRVD_SRC='logsrvd' LOGSRVD_SRC='logsrvd'
@@ -7206,6 +7212,23 @@ printf "%s\n" "$as_me: WARNING: ignoring unknown argument to --enable-python: $e
fi fi
# Check whether --enable-adminconf was given.
if test ${enable_adminconf+y}
then :
enableval=$enable_adminconf; case "$enableval" in
yes|no)
;;
*) adminconfdir="$enableval"
enable_adminconf=yes
;;
esac
else case e in #(
e) enable_adminconf=no ;;
esac
fi
ac_ext=c ac_ext=c
ac_cpp='$CPP $CPPFLAGS' ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -35597,25 +35620,87 @@ SUDO_LIBS=${SUDO_LIBS# }
SUDOERS_LIBS=${SUDOERS_LIBS# } SUDOERS_LIBS=${SUDOERS_LIBS# }
if test X"$prefix" = X"NONE"; then if test X"$prefix" = X"NONE"; then
test "$mandir" = '${datarootdir}/man' && mandir='$(prefix)/man' test X"$mandir" = X'${datarootdir}/man' && mandir='$(prefix)/man'
else else
test "$mandir" = '${datarootdir}/man' && mandir='$(datarootdir)/man' test X"$mandir" = X'${datarootdir}/man' && mandir='$(datarootdir)/man'
fi fi
test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin' test X"$bindir" = X'${exec_prefix}/bin' && bindir='$(exec_prefix)/bin'
test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin' test X"$sbindir" = X'${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin'
test "$libexecdir" = '${exec_prefix}/libexec' && libexecdir='$(exec_prefix)/libexec' test X"$libexecdir" = X'${exec_prefix}/libexec' && libexecdir='$(exec_prefix)/libexec'
test "$includedir" = '${prefix}/include' && includedir='$(prefix)/include' test X"$includedir" = X'${prefix}/include' && includedir='$(prefix)/include'
test "$datarootdir" = '${prefix}/share' && datarootdir='$(prefix)/share' test X"$datarootdir" = X'${prefix}/share' && datarootdir='$(prefix)/share'
test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)' test X"$docdir" = X'${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)'
test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale' test X"$localedir" = X'${datarootdir}/locale' && localedir='$(datarootdir)/locale'
test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var' test X"$localstatedir" = X'${prefix}/var' && localstatedir='$(prefix)/var'
test "$runstatedir" = '${localstatedir}/run' && runstatedir='$(localstatedir)/run' test X"$runstatedir" = X'${localstatedir}/run' && runstatedir='$(localstatedir)/run'
test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' test X"$adminconfdir" = X'${prefix}/etc' && adminconfdir='$(prefix)/etc'
test X"$sysconfdir" = X'${prefix}/etc' && sysconfdir='/etc'
# Expand config file paths for use in pathnames.h # The configuration file search path is to check adminconfdir first and
# fall back to sysconfdir. This can support systems with read-only
# sysconfdir (/etc) that contains a set of default configuration files.
_sysconfdir="$sysconfdir"
while :; do
_sysconfdir="`echo \"$_sysconfdir\" | sed -e 's/(/{/g' -e 's/)/}/g'`"
case "$_sysconfdir" in
*\${[A-Za-z]*}*)
eval _sysconfdir="$_sysconfdir"
;;
*)
break
;;
esac
done
case "$_sysconfdir" in
NONE/*)
_sysconfdir="${ac_default_prefix}${_sysconfdir#NONE}"
;;
esac
_sudo_define_path_exp="$cvtsudoers_conf" _adminconfdir="$adminconfdir"
while :; do
_adminconfdir="`echo \"$_adminconfdir\" | sed -e 's/(/{/g' -e 's/)/}/g'`"
case "$_adminconfdir" in
*\${[A-Za-z]*}*)
eval _adminconfdir="$_adminconfdir"
;;
*)
break
;;
esac
done
case "$_adminconfdir" in
NONE/*)
_adminconfdir="${ac_default_prefix}${_adminconfdir#NONE}"
;;
esac
if test $enable_adminconf = yes
then :
# Only use adminconfdir if different from sysconfdir
if test X"$_sysconfdir" != X"$_adminconfdir"
then :
cvtsudoers_conf='$(adminconfdir)/cvtsudoers.conf:'$cvtsudoers_conf
sudo_conf='$(adminconfdir)/sudo.conf:'$sudo_conf
sudo_logsrvd_conf='$(adminconfdir)/sudo_logsrvd.conf:'$sudo_logsrvd_conf
sudoers_path='$(adminconfdir)/sudoers:'$sudoers_path
fi
fi
# Expand config file paths for use in pathnames.h (after config dir override)
as_save_IFS=$IFS
IFS=:
_sudo_define_path_res=
for as_dir in $cvtsudoers_conf; do
_sudo_define_path_exp="$as_dir"
while :; do while :; do
_sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`" _sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`"
case "$_sudo_define_path_exp" in case "$_sudo_define_path_exp" in
@@ -35633,14 +35718,25 @@ case "$_sudo_define_path_exp" in
;; ;;
esac esac
if test -z "${_sudo_define_path_res}"; then
_sudo_define_path_res="${_sudo_define_path_exp}"
else
_sudo_define_path_res="${_sudo_define_path_res}:${_sudo_define_path_exp}"
fi
done
IFS=$as_save_IFS
cat >>confdefs.h <<EOF cat >>confdefs.h <<EOF
#define _PATH_CVTSUDOERS_CONF "$_sudo_define_path_exp" #define _PATH_CVTSUDOERS_CONF "${_sudo_define_path_res}"
EOF EOF
as_save_IFS=$IFS
IFS=:
_sudo_define_path_res=
for as_dir in $sudo_conf; do
_sudo_define_path_exp="$sudo_conf" _sudo_define_path_exp="$as_dir"
while :; do while :; do
_sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`" _sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`"
case "$_sudo_define_path_exp" in case "$_sudo_define_path_exp" in
@@ -35658,14 +35754,25 @@ case "$_sudo_define_path_exp" in
;; ;;
esac esac
if test -z "${_sudo_define_path_res}"; then
_sudo_define_path_res="${_sudo_define_path_exp}"
else
_sudo_define_path_res="${_sudo_define_path_res}:${_sudo_define_path_exp}"
fi
done
IFS=$as_save_IFS
cat >>confdefs.h <<EOF cat >>confdefs.h <<EOF
#define _PATH_SUDO_CONF "$_sudo_define_path_exp" #define _PATH_SUDO_CONF "${_sudo_define_path_res}"
EOF EOF
as_save_IFS=$IFS
IFS=:
_sudo_define_path_res=
for as_dir in $sudo_logsrvd_conf; do
_sudo_define_path_exp="$sudo_logsrvd_conf" _sudo_define_path_exp="$as_dir"
while :; do while :; do
_sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`" _sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`"
case "$_sudo_define_path_exp" in case "$_sudo_define_path_exp" in
@@ -35683,14 +35790,25 @@ case "$_sudo_define_path_exp" in
;; ;;
esac esac
if test -z "${_sudo_define_path_res}"; then
_sudo_define_path_res="${_sudo_define_path_exp}"
else
_sudo_define_path_res="${_sudo_define_path_res}:${_sudo_define_path_exp}"
fi
done
IFS=$as_save_IFS
cat >>confdefs.h <<EOF cat >>confdefs.h <<EOF
#define _PATH_SUDO_LOGSRVD_CONF "$_sudo_define_path_exp" #define _PATH_SUDO_LOGSRVD_CONF "${_sudo_define_path_res}"
EOF EOF
as_save_IFS=$IFS
IFS=:
_sudo_define_path_res=
for as_dir in $sudoers_path; do
_sudo_define_path_exp="$sudoers_path" _sudo_define_path_exp="$as_dir"
while :; do while :; do
_sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`" _sudo_define_path_exp="`echo \"$_sudo_define_path_exp\" | sed -e 's/(/{/g' -e 's/)/}/g'`"
case "$_sudo_define_path_exp" in case "$_sudo_define_path_exp" in
@@ -35708,8 +35826,15 @@ case "$_sudo_define_path_exp" in
;; ;;
esac esac
if test -z "${_sudo_define_path_res}"; then
_sudo_define_path_res="${_sudo_define_path_exp}"
else
_sudo_define_path_res="${_sudo_define_path_res}:${_sudo_define_path_exp}"
fi
done
IFS=$as_save_IFS
cat >>confdefs.h <<EOF cat >>confdefs.h <<EOF
#define _PATH_SUDOERS "$_sudo_define_path_exp" #define _PATH_SUDOERS "${_sudo_define_path_res}"
EOF EOF
@@ -37934,7 +38059,6 @@ fi
echo "" >&6 echo "" >&6
echo "Configured Sudo version $PACKAGE_VERSION" >&6 echo "Configured Sudo version $PACKAGE_VERSION" >&6
echo " Compiler settings:" >&6 echo " Compiler settings:" >&6
echo " prefix : $prefix" >&6
echo " compiler : $CC" >&6 echo " compiler : $CC" >&6
echo " compiler options : $CFLAGS" >&6 echo " compiler options : $CFLAGS" >&6
echo " preprocessor options : $CPPFLAGS" >&6 echo " preprocessor options : $CPPFLAGS" >&6
@@ -38042,18 +38166,30 @@ echo " mail if user not in sudoers : ${mail_no_user}" >&6
echo " mail if user not on host : ${mail_no_host}" >&6 echo " mail if user not on host : ${mail_no_host}" >&6
echo " mail if command not allowed : ${mail_no_perms}" >&6 echo " mail if command not allowed : ${mail_no_perms}" >&6
echo " Pathnames:" >&6 echo " Pathnames:" >&6
echo " prefix : $prefix" >&6
echo " sysconfdir : $_sysconfdir" >&6
if test "${enable_adminconf-no}" != "no"; then
echo " adminconfdir : $_adminconfdir" >&6
fi
echo " log directory : ${log_dir}" >&6 echo " log directory : ${log_dir}" >&6
echo " run directory : ${rundir}" >&6
echo " var directory : ${vardir}" >&6
echo " I/O log directory : ${iolog_dir}" >&6
echo " sudo_logsrvd relay directory : ${relay_dir}" >&6
if test X"$with_exampledir" != X""; then
echo " exampledir : $exampledir" >&6
fi
echo " plugin directory : ${plugindir}" >&6 echo " plugin directory : ${plugindir}" >&6
echo " sudoers plugin : ${sudoers_plugin}" >&6 echo " sudoers plugin : ${sudoers_plugin}" >&6
if test "${enable_python-no}" != "no"; then if test "${enable_python-no}" != "no"; then
echo " python plugin : ${python_plugin}" >&6 echo " python plugin : ${python_plugin}" >&6
fi fi
echo " run directory : ${rundir}" >&6 echo " sudoers file : ${sudoers_path}" >&6
echo " var directory : ${vardir}" >&6 echo " cvtsudoers.conf file : ${cvtsudoers_conf}" >&6
echo " I/O log directory : ${iolog_dir}" >&6 echo " sudo.conf file : ${sudo_conf}" >&6
echo " sudo_logsrvd relay directory : ${relay_dir}" >&6 echo " sudo_logsrvd.conf file : ${sudo_logsrvd_conf}" >&6
echo " time zone directory : ${tzdir}" >&6
echo " path to sendmail : ${with_sendmail}" >&6 echo " path to sendmail : ${with_sendmail}" >&6
echo " time zone directory : ${tzdir}" >&6
if test -n "$TMPFILES_D"; then if test -n "$TMPFILES_D"; then
echo " systemd tempfiles dir : ${TMPFILES_D}" >&6 echo " systemd tempfiles dir : ${TMPFILES_D}" >&6
fi fi

View File

@@ -109,6 +109,7 @@ AC_SUBST([RC_LINK])dnl
AC_SUBST([COMPAT_EXP])dnl AC_SUBST([COMPAT_EXP])dnl
AC_SUBST([TMPFILES_D])dnl AC_SUBST([TMPFILES_D])dnl
AC_SUBST([exampledir], ['$(docdir)/examples'])dnl AC_SUBST([exampledir], ['$(docdir)/examples'])dnl
AC_SUBST([adminconfdir], ['$(prefix)/etc'])dnl
AC_SUBST([DIGEST])dnl AC_SUBST([DIGEST])dnl
AC_SUBST([devsearch])dnl AC_SUBST([devsearch])dnl
AC_SUBST([SIGNAME])dnl AC_SUBST([SIGNAME])dnl
@@ -1570,6 +1571,17 @@ AC_ARG_ENABLE(python,
esac esac
]) ])
AC_ARG_ENABLE(adminconf,
[AS_HELP_STRING([--enable-adminconf[[=DIR]]], [Use configuration files from adminconfdir in preference to sysconfdir])],
[ case "$enableval" in
yes|no)
;;
*) adminconfdir="$enableval"
enable_adminconf=yes
;;
esac
], [enable_adminconf=no])
dnl dnl
dnl C compiler checks dnl C compiler checks
dnl dnl
@@ -4320,20 +4332,36 @@ dnl
dnl Override default configure dirs for the Makefile dnl Override default configure dirs for the Makefile
dnl dnl
if test X"$prefix" = X"NONE"; then if test X"$prefix" = X"NONE"; then
test "$mandir" = '${datarootdir}/man' && mandir='$(prefix)/man' test X"$mandir" = X'${datarootdir}/man' && mandir='$(prefix)/man'
else else
test "$mandir" = '${datarootdir}/man' && mandir='$(datarootdir)/man' test X"$mandir" = X'${datarootdir}/man' && mandir='$(datarootdir)/man'
fi fi
test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin' test X"$bindir" = X'${exec_prefix}/bin' && bindir='$(exec_prefix)/bin'
test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin' test X"$sbindir" = X'${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin'
test "$libexecdir" = '${exec_prefix}/libexec' && libexecdir='$(exec_prefix)/libexec' test X"$libexecdir" = X'${exec_prefix}/libexec' && libexecdir='$(exec_prefix)/libexec'
test "$includedir" = '${prefix}/include' && includedir='$(prefix)/include' test X"$includedir" = X'${prefix}/include' && includedir='$(prefix)/include'
test "$datarootdir" = '${prefix}/share' && datarootdir='$(prefix)/share' test X"$datarootdir" = X'${prefix}/share' && datarootdir='$(prefix)/share'
test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)' test X"$docdir" = X'${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)'
test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale' test X"$localedir" = X'${datarootdir}/locale' && localedir='$(datarootdir)/locale'
test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var' test X"$localstatedir" = X'${prefix}/var' && localstatedir='$(prefix)/var'
test "$runstatedir" = '${localstatedir}/run' && runstatedir='$(localstatedir)/run' test X"$runstatedir" = X'${localstatedir}/run' && runstatedir='$(localstatedir)/run'
test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' test X"$adminconfdir" = X'${prefix}/etc' && adminconfdir='$(prefix)/etc'
test X"$sysconfdir" = X'${prefix}/etc' && sysconfdir='/etc'
# The configuration file search path is to check adminconfdir first and
# fall back to sysconfdir. This can support systems with read-only
# sysconfdir (/etc) that contains a set of default configuration files.
SUDO_EXPAND_PATH([$sysconfdir], [_sysconfdir])
SUDO_EXPAND_PATH([$adminconfdir], [_adminconfdir])
AS_IF([test $enable_adminconf = yes], [
# Only use adminconfdir if different from sysconfdir
AS_IF([test X"$_sysconfdir" != X"$_adminconfdir"], [
cvtsudoers_conf='$(adminconfdir)/cvtsudoers.conf:'$cvtsudoers_conf
sudo_conf='$(adminconfdir)/sudo.conf:'$sudo_conf
sudo_logsrvd_conf='$(adminconfdir)/sudo_logsrvd.conf:'$sudo_logsrvd_conf
sudoers_path='$(adminconfdir)/sudoers:'$sudoers_path
])
])
# Expand config file paths for use in pathnames.h (after config dir override) # Expand config file paths for use in pathnames.h (after config dir override)
SUDO_DEFINE_PATH([$cvtsudoers_conf], [_PATH_CVTSUDOERS_CONF]) SUDO_DEFINE_PATH([$cvtsudoers_conf], [_PATH_CVTSUDOERS_CONF])
@@ -4367,7 +4395,6 @@ fi
echo "" >&AS_MESSAGE_FD echo "" >&AS_MESSAGE_FD
echo "Configured Sudo version $PACKAGE_VERSION" >&AS_MESSAGE_FD echo "Configured Sudo version $PACKAGE_VERSION" >&AS_MESSAGE_FD
echo " Compiler settings:" >&AS_MESSAGE_FD echo " Compiler settings:" >&AS_MESSAGE_FD
echo " prefix : $prefix" >&AS_MESSAGE_FD
echo " compiler : $CC" >&AS_MESSAGE_FD echo " compiler : $CC" >&AS_MESSAGE_FD
echo " compiler options : $CFLAGS" >&AS_MESSAGE_FD echo " compiler options : $CFLAGS" >&AS_MESSAGE_FD
echo " preprocessor options : $CPPFLAGS" >&AS_MESSAGE_FD echo " preprocessor options : $CPPFLAGS" >&AS_MESSAGE_FD
@@ -4475,18 +4502,30 @@ echo " mail if user not in sudoers : ${mail_no_user}" >&AS_MESSAGE_FD
echo " mail if user not on host : ${mail_no_host}" >&AS_MESSAGE_FD echo " mail if user not on host : ${mail_no_host}" >&AS_MESSAGE_FD
echo " mail if command not allowed : ${mail_no_perms}" >&AS_MESSAGE_FD echo " mail if command not allowed : ${mail_no_perms}" >&AS_MESSAGE_FD
echo " Pathnames:" >&AS_MESSAGE_FD echo " Pathnames:" >&AS_MESSAGE_FD
echo " prefix : $prefix" >&AS_MESSAGE_FD
echo " sysconfdir : $_sysconfdir" >&AS_MESSAGE_FD
if test "${enable_adminconf-no}" != "no"; then
echo " adminconfdir : $_adminconfdir" >&AS_MESSAGE_FD
fi
echo " log directory : ${log_dir}" >&AS_MESSAGE_FD echo " log directory : ${log_dir}" >&AS_MESSAGE_FD
echo " run directory : ${rundir}" >&AS_MESSAGE_FD
echo " var directory : ${vardir}" >&AS_MESSAGE_FD
echo " I/O log directory : ${iolog_dir}" >&AS_MESSAGE_FD
echo " sudo_logsrvd relay directory : ${relay_dir}" >&AS_MESSAGE_FD
if test X"$with_exampledir" != X""; then
echo " exampledir : $exampledir" >&AS_MESSAGE_FD
fi
echo " plugin directory : ${plugindir}" >&AS_MESSAGE_FD echo " plugin directory : ${plugindir}" >&AS_MESSAGE_FD
echo " sudoers plugin : ${sudoers_plugin}" >&AS_MESSAGE_FD echo " sudoers plugin : ${sudoers_plugin}" >&AS_MESSAGE_FD
if test "${enable_python-no}" != "no"; then if test "${enable_python-no}" != "no"; then
echo " python plugin : ${python_plugin}" >&AS_MESSAGE_FD echo " python plugin : ${python_plugin}" >&AS_MESSAGE_FD
fi fi
echo " run directory : ${rundir}" >&AS_MESSAGE_FD echo " sudoers file : ${sudoers_path}" >&AS_MESSAGE_FD
echo " var directory : ${vardir}" >&AS_MESSAGE_FD echo " cvtsudoers.conf file : ${cvtsudoers_conf}" >&AS_MESSAGE_FD
echo " I/O log directory : ${iolog_dir}" >&AS_MESSAGE_FD echo " sudo.conf file : ${sudo_conf}" >&AS_MESSAGE_FD
echo " sudo_logsrvd relay directory : ${relay_dir}" >&AS_MESSAGE_FD echo " sudo_logsrvd.conf file : ${sudo_logsrvd_conf}" >&AS_MESSAGE_FD
echo " time zone directory : ${tzdir}" >&AS_MESSAGE_FD
echo " path to sendmail : ${with_sendmail}" >&AS_MESSAGE_FD echo " path to sendmail : ${with_sendmail}" >&AS_MESSAGE_FD
echo " time zone directory : ${tzdir}" >&AS_MESSAGE_FD
if test -n "$TMPFILES_D"; then if test -n "$TMPFILES_D"; then
echo " systemd tempfiles dir : ${TMPFILES_D}" >&AS_MESSAGE_FD echo " systemd tempfiles dir : ${TMPFILES_D}" >&AS_MESSAGE_FD
fi fi

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2010-2015, 2017-2022 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2010-2015, 2017-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -47,6 +47,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2014, 2017-2022 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2014, 2017-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -40,6 +40,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2011-2015, 2017-2018 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2011-2015, 2017-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -40,6 +40,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -37,6 +37,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2011-2018 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2011-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -35,6 +35,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2019-2021 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2019-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -98,6 +98,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localedir = @localedir@ localedir = @localedir@

View File

@@ -2,7 +2,7 @@ dnl Local m4 macros for autoconf (used by sudo)
dnl dnl
dnl SPDX-License-Identifier: ISC dnl SPDX-License-Identifier: ISC
dnl dnl
dnl Copyright (c) 1994-1996, 1998-2005, 2007-2022 dnl Copyright (c) 1994-1996, 1998-2005, 2007-2023
dnl Todd C. Miller <Todd.Miller@sudo.ws> dnl Todd C. Miller <Todd.Miller@sudo.ws>
dnl dnl
dnl Permission to use, copy, modify, and distribute this software for any dnl Permission to use, copy, modify, and distribute this software for any
@@ -705,10 +705,21 @@ esac
]) ])
dnl dnl
dnl Expand Makefile-style variables in $1 and define as the string $2. dnl Expand Makefile-style variables in $1, a colon-separated list of paths,
dnl Used to define file paths in pathnames.h. dnl and define the result as a string using the name $2.
dnl dnl
AC_DEFUN([SUDO_DEFINE_PATH], [ AC_DEFUN([SUDO_DEFINE_PATH], [
SUDO_EXPAND_PATH([$1], [_sudo_define_path_exp]) as_save_IFS=$IFS
SUDO_DEFINE_UNQUOTED($2, "$_sudo_define_path_exp") IFS=:
_sudo_define_path_res=
for as_dir in $1; do
SUDO_EXPAND_PATH([$as_dir], [_sudo_define_path_exp])
if test -z "${_sudo_define_path_res}"; then
_sudo_define_path_res="${_sudo_define_path_exp}"
else
_sudo_define_path_res="${_sudo_define_path_res}:${_sudo_define_path_exp}"
fi
done
IFS=$as_save_IFS
SUDO_DEFINE_UNQUOTED($2, "${_sudo_define_path_res}")
]) ])

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2020 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2020-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -86,6 +86,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2010-2018 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2010-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -88,6 +88,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2019-2020 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2019-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -93,6 +93,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2011-2022 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2011-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -87,6 +87,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2020 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2020-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -86,6 +86,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -120,6 +120,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localedir = @localedir@ localedir = @localedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2011-2018 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2011-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -88,6 +88,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@

View File

@@ -1,7 +1,7 @@
# #
# SPDX-License-Identifier: ISC # SPDX-License-Identifier: ISC
# #
# Copyright (c) 2010-2022 Todd C. Miller <Todd.Miller@sudo.ws> # Copyright (c) 2010-2023 Todd C. Miller <Todd.Miller@sudo.ws>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@@ -102,6 +102,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
sbindir = @sbindir@ sbindir = @sbindir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
adminconfdir = @adminconfdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
localedir = @localedir@ localedir = @localedir@