Bug 393

Summary: sudo's #include functionality doesn't handle cycles
Product: Sudo Reporter: Todd C. Miller <Todd.Miller>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED INVALID    
Severity: normal    
Priority: low    
Version: 1.7.2   
Hardware: All   
OS: All   

Description Todd C. Miller 2010-02-09 10:47:20 MST
Given the following /etc/sudoers file:

#include /etc/sudoers.local

Where the included file also has:

#include /etc/sudoers

sudo will keep opening and parsing the files until it runs out of file descriptors.  It should check the list of currently open include files and refuse to open one that is already open.
Comment 1 Todd C. Miller 2010-02-09 11:12:22 MST
Actually, sudo will only open a max of 128 sudoers files at any one time so it will not consume all descriptors.