Bug 429

Summary: Missing mkdir of /etc/sudoers.d in installer for security/sudo port
Product: Sudo Reporter: t.telan
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: low    
Priority: low    
Version: 1.7.4   
Hardware: All   
OS: FreeBSD   

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.