Red Hat Bugzilla – Bug 566134
Augeas sudoers lens does not support secure_path
Last modified: 2013-04-30 19:41:37 EDT
Created attachment 394717 [details]
a patch to add "secure_path" as an accepted variable
Description of problem:
Augeas sudoers lens fails to parse standard Fedora 12 /etc/sudoers file.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create an augeas root from /etc (e.g. /tmp/augeas/sandbox)
2. use augtool -b -r /tmp/augeas-sandbox
3. ls /files/etc/sudoers
sudoers is not present.
checking the errors:
augtool> match /augeas//error
/augeas/files/etc/sudoers/error = parse_failed
augtool> ls /augeas/files/etc/sudoers/error
pos = 2255
line = 65
char = 0
lens = /usr/share/augeas/lenses/dist/sudoers.aug:478.10-.57:
message = Iterated lens matched less than it should
line 65 of the sudoers file is
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
sudoers file is succesfully parsed.
commenting the offending line out in sudoers causes the parser to succeed.
it appears that the issue is with the secure_path keyword, which is mentioned nowhere in the sudoers lens.
with the attached patch applied (adding | "secure_path" to the parameter_string_nobool_kw) definition seems to fix this.
Fixed upstream with commit c80d1be4. Will be in augeas-0.7.1