From cf2f37136fd18ef0ff29369c201f7fcbc122e12a Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 16 Oct 2019 12:17:06 -0600 Subject: [PATCH] No need to check existing sudoers file when installing to DESTDIR This check can cause problems on systems where /etc/sudoers.d is not readable. --- plugins/sudoers/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index c813c3ab7..68834b075 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -384,9 +384,9 @@ sudoers: $(srcdir)/sudoers.in cd $(top_builddir) && $(SHELL) config.status --file=plugins/sudoers/$@ pre-install: - @if test X"$(cross_compiling)" != X"yes" -a -r $(DESTDIR)$(sudoersdir)/sudoers; then \ + @if test X"$(cross_compiling)" != X"yes" -a X"$(DESTDIR)" = X""; then \ echo "Checking existing sudoers file for syntax errors."; \ - ./visudo -c -f $(DESTDIR)$(sudoersdir)/sudoers; \ + ./visudo -c -f $(sudoersdir)/sudoers; \ fi install: install-plugin install-binaries install-sudoers install-doc