Bug 429 - Missing mkdir of /etc/sudoers.d in installer for security/sudo port
Missing mkdir of /etc/sudoers.d in installer for security/sudo port
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.7.4
All FreeBSD
: low low
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-17 23:33 MDT by t.telan
Modified: 2010-08-18 19:17 MDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description t.telan 2010-08-17 23:33:24 MDT
http://forums.freebsd.org/showthread.php?p=97892#post97892

From a fresh install of FreeBSD 8.1-RELEASE amd64, installing sudo from the security/sudo port does not create /etc/sudoers.d, which is included by the default config file:

(Relevant line in default /usr/local/etc/sudoers)
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d

(Initial error after installation)
>>> /usr/local/etc/sudoers: /etc/sudoers.d near line 97 <<<
sudo: parse error in /usr/local/etc/sudoers near line 97
sudo: no valid sudoers sources found, quitting

These errors go away after creating /etc/sudoers.d, or by removing the line from the config.
Comment 1 Todd C. Miller 2010-08-18 08:12:12 MDT
Sudo creates that directory as part of "make install".  The problem is that the value of sysconfdir is not substituted into the sudoers file.  This means that if sysconfdir is changed from the default (/etc) the path in sudoers won't match what "make install" creates.  I've fixed this in the sudo source repo and the change will be in sudo 1.7.4p3.
Comment 2 Todd C. Miller 2010-08-18 19:17:25 MDT
Fixed in sudo 1.7.4p3, available now.