trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.87k stars 76 forks source link

Add positional information to all parse error messages. #817

Open squell opened 7 months ago

squell commented 7 months ago

Some error messages in the sudoers file (e.g. an include file not found, recursive aliases) give correct parse error message but don't reveal the location. We could add this by adding location info in the AST for selected AST types. (Related to issue #806 and PR #815)

Possible exception would be recursive alias definitions (those don't really originate from a single location, and simply identifying the problematic alias gives enough clues on how to fix them in a sudoers config).