Bug 566134

Summary: Augeas sudoers lens does not support secure_path
Product: [Fedora] Fedora Reporter: Stuart Sears <ssears>
Component: augeasAssignee: David Lutterkort <lutter>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: apevec, hbrock, lutter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-22 14:46:49 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
a patch to add "secure_path" as an accepted variable none

Description Stuart Sears 2010-02-17 06:53:21 EST
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):
augeas-0.7.0-1.fc12.i686

How reproducible:
Every time

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
  
Actual results:
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

Expected results:
sudoers file is succesfully parsed.
parameter_string_nobool_kw

Additional info:

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.
Comment 1 David Lutterkort 2010-02-22 14:46:49 EST
Fixed upstream with commit c80d1be4. Will be in augeas-0.7.1