Bug 1404418

Summary: inconsistent use of /etc/grub2.cfg
Product: Red Hat Enterprise Linux 7 Reporter: Marek Haicman <mhaicman>
Component: scap-security-guideAssignee: Watson Yuuma Sato <wsato>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: mgrepl, mhaicman, openscap-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-12 16:16:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Marek Haicman 2016-12-13 19:36:15 UTC
Description of problem:
According to https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Making_Persistent_Changes_to_a_GRUB_2_Menu_Using_the_grubby_Tool.html

in Red Hat Enterprise Linux, /etc/grub2.cfg is symlink to the grub.cfg, whose location is architecture dependant. That means all occurences of /boot/grub2/grub.cfg [or typo-ed /boot/grub2/grub2.cfg] are pointing to the file which might be missing on architecture different to x86_64

Version-Release number of selected component (if applicable):
scap-security-guide-0.1.30-3.el7.noarch

How reproducible:
reliably

Steps to Reproduce:
1. just grep over the datastream
2.
3.

Actual results:
/etc/grub2/grub.cfg and /etc/grub2/grub2.cfg are used there abundantly.

Expected results:
Only /etc/grub2.cfg is used for rules validation.

Additional info:
/boot/grub2/grub2.cfg typo was already fixed upstream: https://github.com/OpenSCAP/scap-security-guide/commit/0fdfbd268a5022ef19263f228f98754941317854

Comment 2 Martin Preisler 2017-03-06 20:51:04 UTC
Fix proposed upstream: https://github.com/OpenSCAP/scap-security-guide/pull/1737

Comment 3 Martin Preisler 2017-03-10 02:29:28 UTC
This won't be as easy to fix as I thought, moving back to NEW.

We could use realpath and figure out the final absolute path but removing the symlink may be an actual use-case and that would be broken after this change. Not clear how to proceed here.

Comment 5 Marek Haicman 2019-03-12 16:16:23 UTC
This issue was not selected to be included in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small number of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise, we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.