Re: [PATCH] sudo/plugins/suoders/sudoers2ldif: Support #include and #includedir recursively

"Todd C. Miller" <[email protected]> Tue, 17 Oct 2017 14:29:40 -0600
Newsgroups gmane.comp.tools.sudo.devel
Message-ID <[email protected]>
On Mon, 16 Oct 2017 16:11:03 +0200, Natale Vinto wrote:

> as said sometimes ago in the mailing list, I was wondering on how
> better extend sudoers2ldif script, starting from supporting #include
> and #includedir.
> 
> The idea is to look recursively for any #include and #includedir
> directive in file parsed, and then parse it accordingly maintaining
> the same behavior as now.

Thanks, that looks great.  I made a few minor changes to handle
relative include paths, for example:

#include sudoers.other

should look in the same parent directory as the file it was included
from.

I also added checks to skip reading file with a '.' in them or that
end in '~' when scanning an include dir.  This is consistent with
how the sudoers parser behaves.

This has been committed as https://www.sudo.ws/repos/sudo/rev/926deea0d506

 - todd
____________________________________________________________
sudo-workers mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-workers