[sudo-users] Sudoers EBNF Spec

Jon three18ti at gmail.com
Thu Oct 17 05:20:19 MDT 2013


Hello,

I am working on a tool to parse an analyze our sudoers file (it's a huge
several thousand line mess and I'm working on an external tool to help me
understand the chaos).

I'm looking at leveraging Marpa [1] to do the parsing.  Since Marpa
understands EBNF (It actually uses EEBNF) and the majority of the
specification is listed on the website [2] my job at describing the grammar
is easier than trying to write the grammar from scratch.

However, it seems like the grammar is incomplete in the manual.  For
instance, it seems like the specification for all of the special variables
and wildcards.

Is there a full grammar specification posted somewhere?  (Or is that the
full specification?)

Also, I would greatly appreciate any words of wisdom if anyone has
experience parsing and analyzing the sudoers file (I found a couple of
parsers online, but they really don't fit my needs)

Thanks for the assistance.

Best Regards,
Jon A


[1]  http://search.cpan.org/~jkegl/Marpa-R2-2.070000/pod/Marpa_R2.pod
[2]  http://www.sudo.ws/sudoers.man.html


More information about the sudo-users mailing list