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.
This commit is contained in:
Todd C. Miller
2019-10-16 12:17:06 -06:00
parent 43e44a9982
commit cf2f37136f

View File

@@ -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