Bugzilla – Bug 902
Parse error in plugins/sudoers/sudoers.in near line 96
Last modified: 2019-12-31 15:09:53 MST
I get a following error when building sudo 1.8.28p1 on OpenIndiana 2019.05: make[4]: Entering directory '/jenkins/jobs/oi-userland/workspace/components/sysutils/sudo/build/amd64/plugins/sudoers' Checking existing sudoers file for syntax errors. visudo: /etc/sudoers.d: Permission denied parse error in /jenkins/jobs/oi-userland/workspace/components/sysutils/sudo/build/prototype/i386/etc/sudoers near line 96 make[4]: *** [Makefile:387: pre-install] Error 1 It seems that the check here sudo_1.8.28p1_visudo sudo-1.8.28p1/plugins/sudoers/Makefile.in: 386 pre-install: 387 @if test X"$(cross_compiling)" != X"yes" -a -r $(DESTDIR)$(sudoersdir)/sudoers; then \ 388 echo "Checking existing sudoers file for syntax errors."; \ 389 ./visudo -c -f $(DESTDIR)$(sudoersdir)/sudoers; \ 390 fi ... wants space between '#' and 'includedir': sudo-1.8.28p1/plugins/sudoers/sudoers.in: 95 ## Read drop-in files from @sysconfdir@/sudoers.d 96 ## (the '#' here does not indicate a comment) 97 #includedir @sysconfdir@/sudoers.d With space it validates. The check is for me triggered only in some environments.
I don't think that's the problem. The syntax error you are talking about will not happen with the expanded sudoers file. The actual problem appears to be this: visudo: /etc/sudoers.d: Permission denied Presumably this is due to the user running "make install" cannot access /etc/sudoers.d. There is a check in plugins/sudoers/Makefile.in to only run the visudo check when the user doing in the install can read /etc/sudoers. However, it is possible that the user is unable to access files or directories included by that sudoers file.
Created attachment 530 [details] Avoid checking sudoers when install into a DESTDIR I think just skipping the sudoers check for DESTDIR installs will fix your issue.
(In reply to Todd C. Miller from comment #2) > Created attachment 530 [details] > Avoid checking sudoers when install into a DESTDIR > > I think just skipping the sudoers check for DESTDIR installs will > fix your issue. The fix worked for me. Thanks!
Fixed in sudo 1.8.29