Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
RHEL 7.4 includes a rebase of sudo:
https://bugzilla.redhat.com/show_bug.cgi?id=1360687
The rebase brought a new default option in the sudoers file installed by default, namely:
Defaults match_group_by_gid
This breaks augeas when using the sudoers lens; for example this happens when rebuilding OpenStack Sahara images, which uses set -e.
Ideally this should be fixed in 7.4 too in some way.
Version-Release number of selected component (if applicable):
augeas-1.4.0-2.el7.x86_64
sudo-1.8.19p2-10.el7.x86_64
Steps to reproduce and actual result:
augtool <<EOF
clear /files/etc/sudoers/Defaults[type=':nrpe']/requiretty/negate
save
print /augeas//error
EOF
error: Failed to execute command
saving failed (run 'errors' for details)
/augeas/files/etc/krb5.conf/error = "parse_failed"
/augeas/files/etc/krb5.conf/error/pos = "65"
/augeas/files/etc/krb5.conf/error/line = "2"
/augeas/files/etc/krb5.conf/error/char = "0"
/augeas/files/etc/krb5.conf/error/lens = "/usr/share/augeas/lenses/dist/krb5.aug:154.10-156.66:"
/augeas/files/etc/krb5.conf/error/message = "Get did not match entire input"
/augeas/files/etc/sudoers/error = "parse_skel_failed"
/augeas/files/etc/sudoers/error/pos = "3994"
/augeas/files/etc/sudoers/error/line = "115"
/augeas/files/etc/sudoers/error/char = "0"
/augeas/files/etc/sudoers/error/lens = "/usr/share/augeas/lenses/dist/sudoers.aug:530.10-.70:"
/augeas/files/etc/sudoers/error/lens/last_matched = "/usr/share/augeas/lenses/dist/sep.aug:47.18-.40:"
/augeas/files/etc/sudoers/error/lens/next_not_matched = "/usr/share/augeas/lenses/dist/sudoers.aug:412.23-413.57:"
/augeas/files/etc/sudoers/error/message = "Iterated lens matched less than it should"
# echo $?
1
Expected results:
# augtool <<EOF
clear /files/etc/sudoers/Defaults[type=':nrpe']/requiretty/negate
save
print /augeas//error
EOF
Saved 1 file(s)
/augeas/files/etc/krb5.conf/error = "parse_failed"
/augeas/files/etc/krb5.conf/error/pos = "65"
/augeas/files/etc/krb5.conf/error/line = "2"
/augeas/files/etc/krb5.conf/error/char = "0"
/augeas/files/etc/krb5.conf/error/lens = "/usr/share/augeas/lenses/dist/krb5.aug:154.10-156.66:"
/augeas/files/etc/krb5.conf/error/message = "Get did not match entire input"
# echo $?
0