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.
Bug 1716359 - Ssh: cannot parse Match options
Summary: Ssh: cannot parse Match options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: augeas
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-03 10:22 UTC by Pino Toscano
Modified: 2024-06-13 22:08 UTC (History)
6 users (show)

Fixed In Version: augeas-1.12.0-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:08:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github hercules-team augeas issues 632 0 'None' closed Ssh: cannot parse Match options 2021-02-20 10:27:18 UTC
Github hercules-team augeas pull 695 0 None closed Ssh: add Match keyword support 2021-02-20 10:27:18 UTC
Red Hat Product Errata RHBA-2021:1693 0 None None None 2021-05-18 15:08:06 UTC

Description Pino Toscano 2019-06-03 10:22:12 UTC
Description of problem:
The Ssh lens cannot parse Match options in ssh_config file, or shippets for it.

In particular, after the openssh rebase (bug 1691045), the /etc/ssh/ssh_config.d/05-redhat.conf file starting from openssh-clients-8.0p1-1.el8.x86_64 has a Match option, and thus it cannot be parsed by the Ssh lens.

Version-Release number of selected component (if applicable):
augeas-1.12.0-1.el8

How reproducible:
Always.

Steps to Reproduce:
1. install openssh-clients
2. run `augtool print /augeas//error | grep ssh_config`

Actual results:
/augeas/files/etc/ssh/ssh_config.d/05-redhat.conf/error = "parse_failed"
/augeas/files/etc/ssh/ssh_config.d/05-redhat.conf/error/pos = "149"
/augeas/files/etc/ssh/ssh_config.d/05-redhat.conf/error/line = "3"
/augeas/files/etc/ssh/ssh_config.d/05-redhat.conf/error/char = "0"
/augeas/files/etc/ssh/ssh_config.d/05-redhat.conf/error/lens = "/usr/share/augeas/lenses/dist/ssh.aug:112.14-.28:"
/augeas/files/etc/ssh/ssh_config.d/05-redhat.conf/error/message = "Get did not match entire input"

Expected results:
- no output of the command in step 2
- `augtool -r . print /files/etc/ssh/ssh_config.d/` prints the parsed content of /etc/ssh/ssh_config.d/05-redhat.conf

Additional info:
I just reported it upstream as https://github.com/hercules-team/augeas/issues/632

Comment 3 Pino Toscano 2020-10-07 08:31:54 UTC
It was fixed recently: https://github.com/hercules-team/augeas/pull/695

So let's try to fix this for RHEL 8.4.

Comment 6 YongkuiGuo 2021-01-05 10:28:26 UTC
Verified with package:
augeas-1.12.0-6.el8.x86_64

Steps:

1. On rhel8.4.0 host
# augtool print /augeas//error | grep ssh_config
No output.

2.
# augtool print /files/etc/ssh/ssh_config.d/05-redhat.conf
/files/etc/ssh/ssh_config.d/05-redhat.conf
/files/etc/ssh/ssh_config.d/05-redhat.conf/#comment[1] = "The options here are in the \"Match final block\" to be applied as the last"
/files/etc/ssh/ssh_config.d/05-redhat.conf/#comment[2] = "options and could be potentially overwritten by the user configuration"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Condition
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Condition/final = "all"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/#comment[1] = "Follow system-wide Crypto Policy, if defined:"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/Include = "/etc/crypto-policies/back-ends/openssh.config"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/GSSAPIAuthentication = "yes"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/#comment[2] = "If this option is set to yes then remote X11 clients will have full access"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/#comment[3] = "to the original X11 display. As virtually no X11 client supports the untrusted"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/#comment[4] = "mode correctly we set this to yes."
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/ForwardX11Trusted = "yes"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/#comment[5] = "Send locale-related environment variables"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[1]
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[1]/1 = "LANG"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[1]/2 = "LC_CTYPE"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[1]/3 = "LC_NUMERIC"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[1]/4 = "LC_TIME"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[1]/5 = "LC_COLLATE"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[1]/6 = "LC_MONETARY"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[1]/7 = "LC_MESSAGES"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[2]
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[2]/1 = "LC_PAPER"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[2]/2 = "LC_NAME"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[2]/3 = "LC_ADDRESS"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[2]/4 = "LC_TELEPHONE"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[2]/5 = "LC_MEASUREMENT"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[3]
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[3]/1 = "LC_IDENTIFICATION"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[3]/2 = "LC_ALL"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[3]/3 = "LANGUAGE"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[4]
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/SendEnv[4]/1 = "XMODIFIERS"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/#comment[6] = "Uncomment this if you want to use .local domain"
/files/etc/ssh/ssh_config.d/05-redhat.conf/Match/Settings/#comment[7] = "Host *.local"

The latest ssh lens can parse Match options in /etc/ssh/ssh_config.d/05-redhat.conf file. So verified this bug.

Comment 8 errata-xmlrpc 2021-05-18 15:08:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (augeas bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1693


Note You need to log in before you can comment on or make changes to this bug.