From 63b2a62f8ac00b2b19a18c93319614f265e992fe Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 11 Feb 2022 19:19:09 -0700 Subject: [PATCH] Substitute values in the example syslog.conf too. Also update ignore files for example changes --- .gitignore | 3 +++ .hgignore | 3 +++ MANIFEST | 2 +- configure | 3 ++- configure.ac | 2 +- examples/Makefile.in | 9 ++++++--- examples/sudo.conf.in | 4 ++-- examples/{syslog.conf => syslog.conf.in} | 6 +++--- 8 files changed, 21 insertions(+), 11 deletions(-) rename examples/{syslog.conf => syslog.conf.in} (87%) diff --git a/.gitignore b/.gitignore index 83be825f9..e5ba2ae30 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,9 @@ docs/*.mdoc docs/fixman.sed examples/sudo.conf +examples/sudo_logsrvd.conf +examples/sudoers +examples/syslog.conf etc/init.d/sudo.conf diff --git a/.hgignore b/.hgignore index 027bf1383..c0e733ef0 100644 --- a/.hgignore +++ b/.hgignore @@ -29,6 +29,9 @@ Makefile$ ^etc/init\.d/sudo\.conf$ ^examples/sudo\.conf$ +^examples/sudo_logsrvd\.conf$ +^examples/sudoers$ +^examples/syslog\.conf$ ^init\.d/.*\.sh$ ^init\.d/sudo\.conf$ diff --git a/MANIFEST b/MANIFEST index 130b4c08c..1754e5cc6 100644 --- a/MANIFEST +++ b/MANIFEST @@ -81,7 +81,7 @@ examples/pam.conf examples/sudo.conf.in examples/sudo_logsrvd.conf.in examples/sudoers.in -examples/syslog.conf +examples/syslog.conf.in include/Makefile.in include/compat/charclass.h include/compat/endian.h diff --git a/configure b/configure index f3786eafd..5d9f2470c 100755 --- a/configure +++ b/configure @@ -32257,7 +32257,7 @@ elif test X"$TMPFILES_D" != X""; then fi -ac_config_files="$ac_config_files Makefile docs/Makefile examples/Makefile examples/sudoers examples/sudo.conf examples/sudo_logsrvd.conf include/Makefile lib/eventlog/Makefile lib/fuzzstub/Makefile lib/iolog/Makefile lib/logsrv/Makefile lib/protobuf-c/Makefile lib/util/Makefile lib/util/util.exp logsrvd/Makefile src/intercept.exp src/sudo_usage.h src/Makefile plugins/audit_json/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/sample_approval/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers" +ac_config_files="$ac_config_files Makefile docs/Makefile examples/Makefile examples/sudoers examples/sudo.conf examples/sudo_logsrvd.conf examples/syslog.conf include/Makefile lib/eventlog/Makefile lib/fuzzstub/Makefile lib/iolog/Makefile lib/logsrv/Makefile lib/protobuf-c/Makefile lib/util/Makefile lib/util/util.exp logsrvd/Makefile src/intercept.exp src/sudo_usage.h src/Makefile plugins/audit_json/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/sample_approval/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers" cat >confcache <<\_ACEOF @@ -33254,6 +33254,7 @@ do "examples/sudoers") CONFIG_FILES="$CONFIG_FILES examples/sudoers" ;; "examples/sudo.conf") CONFIG_FILES="$CONFIG_FILES examples/sudo.conf" ;; "examples/sudo_logsrvd.conf") CONFIG_FILES="$CONFIG_FILES examples/sudo_logsrvd.conf" ;; + "examples/syslog.conf") CONFIG_FILES="$CONFIG_FILES examples/syslog.conf" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "lib/eventlog/Makefile") CONFIG_FILES="$CONFIG_FILES lib/eventlog/Makefile" ;; "lib/fuzzstub/Makefile") CONFIG_FILES="$CONFIG_FILES lib/fuzzstub/Makefile" ;; diff --git a/configure.ac b/configure.ac index 3535f6051..abcc51563 100644 --- a/configure.ac +++ b/configure.ac @@ -5114,7 +5114,7 @@ elif test X"$TMPFILES_D" != X""; then AC_CONFIG_FILES([etc/init.d/sudo.conf]) fi -AC_CONFIG_FILES([Makefile docs/Makefile examples/Makefile examples/sudoers examples/sudo.conf examples/sudo_logsrvd.conf include/Makefile lib/eventlog/Makefile lib/fuzzstub/Makefile lib/iolog/Makefile lib/logsrv/Makefile lib/protobuf-c/Makefile lib/util/Makefile lib/util/util.exp logsrvd/Makefile src/intercept.exp src/sudo_usage.h src/Makefile plugins/audit_json/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/sample_approval/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers]) +AC_CONFIG_FILES([Makefile docs/Makefile examples/Makefile examples/sudoers examples/sudo.conf examples/sudo_logsrvd.conf examples/syslog.conf include/Makefile lib/eventlog/Makefile lib/fuzzstub/Makefile lib/iolog/Makefile lib/logsrv/Makefile lib/protobuf-c/Makefile lib/util/Makefile lib/util/util.exp logsrvd/Makefile src/intercept.exp src/sudo_usage.h src/Makefile plugins/audit_json/Makefile plugins/sample/Makefile plugins/group_file/Makefile plugins/sample_approval/Makefile plugins/system_group/Makefile plugins/sudoers/Makefile plugins/sudoers/sudoers]) AC_OUTPUT diff --git a/examples/Makefile.in b/examples/Makefile.in index 0b58e4233..595cfdf99 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: ISC # -# Copyright (c) 2014, 2017-2021 Todd C. Miller +# Copyright (c) 2014, 2017-2022 Todd C. Miller # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -55,7 +55,7 @@ SHELL = @SHELL@ LOGSRVD_CONF = @LOGSRVD_CONF@ EXAMPLES = $(srcdir)/cvtsudoers.conf $(srcdir)/pam.conf sudo.conf \ - $(LOGSRVD_CONF) sudoers $(srcdir)/syslog.conf + $(LOGSRVD_CONF) sudoers syslog.conf VERSION = @PACKAGE_VERSION@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ @@ -76,6 +76,9 @@ sudo.conf: $(srcdir)/sudo.conf.in sudo_logsrvd.conf: $(srcdir)/sudo_logsrvd.conf.in cd $(top_builddir) && ./config.status --file examples/sudo_logsrvd.conf +syslog.conf: $(srcdir)/syslog.conf.in + cd $(top_builddir) && ./config.status --file examples/syslog.conf + pre-install: install: install-doc @@ -121,7 +124,7 @@ clean: mostlyclean: clean distclean: clean - -rm -rf Makefile sudo.conf + -rm -rf Makefile sudo.conf sudo_logsrvd.conf sudoers syslog.conf clobber: distclean diff --git a/examples/sudo.conf.in b/examples/sudo.conf.in index 41586bd87..415106a95 100644 --- a/examples/sudo.conf.in +++ b/examples/sudo.conf.in @@ -135,5 +135,5 @@ # Priority may be crit, err, warn, notice, diag, info, trace, or debug. # Multiple subsystem@priority may be specified, separated by a comma. # -#Debug sudo /var/log/sudo_debug all@debug -#Debug sudoers.so /var/log/sudoers_debug all@debug +#Debug sudo @log_dir@/sudo_debug all@debug +#Debug sudoers.so @log_dir@/sudoers_debug all@debug diff --git a/examples/syslog.conf b/examples/syslog.conf.in similarity index 87% rename from examples/syslog.conf rename to examples/syslog.conf.in index 686cd1931..eff72ac53 100644 --- a/examples/syslog.conf +++ b/examples/syslog.conf.in @@ -14,11 +14,11 @@ # # Syslogd will not create new log files for you, you must first # create the file before syslogd will log to it. Eg. -# 'touch /var/log/sudo' +# 'touch @log_dir@/sudo' -# This logs successful and failed sudo attempts to the file /var/log/auth +# This logs successful and failed sudo attempts to the file @log_dir@/auth # If your system has the authpriv syslog facility, use authpriv.debug -auth.debug /var/log/auth +auth.debug @log_dir@/auth # To log to a remote machine, use something like the following, # where "loghost" is the name of the remote machine.