From 93071b00b5b1a4190ee590e9ed65a5072b3b7f58 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 29 Mar 2011 15:26:25 -0400 Subject: [PATCH] If there is an existing sudoers file, only install if it passes a syntax check. --HG-- branch : 1.7 --- Makefile.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 450683bf0..b16338b12 100644 --- a/Makefile.in +++ b/Makefile.in @@ -535,7 +535,13 @@ ChangeLog: fi; \ fi -install: install-dirs install-binaries @INSTALL_NOEXEC@ install-sudoers install-doc +pre-install: + @if test -r $(DESTDIR)$(sudoersdir)/sudoers; then \ + echo "Checking existing sudoers file for syntax errors."; \ + ./visudo -c -f $(DESTDIR)$(sudoersdir)/sudoers; \ + fi + +install: pre-install install-dirs install-binaries @INSTALL_NOEXEC@ install-sudoers install-doc install-dirs: $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(sudodir) \ -- 2.40.0