Bug 1945481
| Summary: | [insights-client|Bug] System motd should not be modified if already set | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Bryan Kinney <bkinney> |
| Component: | insights-client | Assignee: | Link Dupont <link> |
| Status: | CLOSED ERRATA | QA Contact: | Pavol Kotvan <pakotvan> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 8.2 | CC: | cww, gmccullo, jcrafts, kdixon, link, peter.vreman, prgutier |
| Target Milestone: | beta | Keywords: | Triaged, ZStream |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 3.1.4 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-08-10 14:00:02 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: | |
| Embargoed: | |||
|
Description
Bryan Kinney
2021-04-01 05:25:36 UTC
Could you confirm that version 3.1.4 will be available to RHEL 7.9 as well? I assume that RHEL 8.5.0 is just the OS where the client version 3.1.4 will be installed by default. Yup, we'll be targeting a z-stream release for 7.9 at the next possible opportunity. This bug in particular shouldn't be affecting RHEL 7.9, as it does not have a pam_motd.so module that supports /etc/motd.d. We will probably be backporting insights-client 3.1.4 into RHEL 7.9 for another bug fix, but this bug won't be cloned and targeted to RHEL 7.9. The backport will be fixing a different bug. Ah yep... mistook this bug for a separate one. Carry on. Link, Even that RHEL7.9 does not have pam_motd.so the insights-client is still touching and modifying the SELinux content on the /etc/motd.d/insighst-client file even it content is not change (and maybe even not used, but i cannot test it because it already do not want it be seen) Below the reproducer that proves that RHEL7.9 insight-client is also impacted and modifying the SELInux content and modifying the ctime and mtime. ------ vrempet-admin@li-lc-1437 ~ $ rpm -q insights-client insights-client-3.1.1-1.el7_9.noarch vrempet-admin@li-lc-1437 ~ $ sudo insights-client --version Client: 3.1.1 Core: 3.0.222-1 vrempet-admin@li-lc-1437 ~ $ ls -lZ /etc/motd.d/insights-client lrwxrwxrwx. root root system_u:object_r:etc_t:s0 /etc/motd.d/insights-client -> /dev/null vrempet-admin@li-lc-1437 ~ $ ls -l /etc/motd.d/insights-client lrwxrwxrwx. 1 root root 9 May 26 01:34 /etc/motd.d/insights-client -> /dev/null vrempet-admin@li-lc-1437 ~ $ stat /etc/motd.d/insights-client File: ‘/etc/motd.d/insights-client’ -> ‘/dev/null’ Size: 9 Blocks: 0 IO Block: 4096 symbolic link Device: fd00h/64768d Inode: 1893 Links: 1 Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) Context: system_u:object_r:etc_t:s0 Access: 2021-05-26 02:06:53.700383564 +0000 Modify: 2021-05-26 01:34:07.651863779 +0000 Change: 2021-05-26 01:34:07.651863779 +0000 Birth: - vrempet-admin@li-lc-1437 ~ $ sudo insights-client Starting to collect Insights data for [crash/LI/IPS/OSDev-7.9-backup] li-lc-1437.hag.hilti.com Uploading Insights data. Successfully uploaded report from [crash/LI/IPS/OSDev-7.9-backup] li-lc-1437.hag.hilti.com to account XXXXXXXXXX. View details about this system on cloud.redhat.com: https://cloud.redhat.com/insights/inventory/xxxxxxxxxxxxxxxx vrempet-admin@li-lc-1437 ~ $ date Wed May 26 11:29:44 UTC 2021 vrempet-admin@li-lc-1437 ~ $ ls -lZ /etc/motd.d/insights-client lrwxrwxrwx. root root unconfined_u:object_r:etc_t:s0 /etc/motd.d/insights-client -> /dev/null vrempet-admin@li-lc-1437 ~ $ stat /etc/motd.d/insights-client File: ‘/etc/motd.d/insights-client’ -> ‘/dev/null’ Size: 9 Blocks: 0 IO Block: 4096 symbolic link Device: fd00h/64768d Inode: 1893 Links: 1 Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) Context: unconfined_u:object_r:etc_t:s0 Access: 2021-05-26 11:29:48.531341224 +0000 Modify: 2021-05-26 11:29:40.803215768 +0000 Change: 2021-05-26 11:29:40.803215768 +0000 Birth: - vrempet-admin@li-lc-1437 ~ $ ------------ Wow, thank you Peter. That's a very interesting point. I need to double-check which version of PAM introduced the motd.d support, but, assuming that RHEL 7.9 does not have /etc/motd.d support, I think the fix for RHEL 7.9 is to make sure that /etc/motd.d/insights-client is never created in the first place. [root@rhel7-devbox ~]# rpm -q pam pam-1.1.8-23.el7.x86_64 Looks like /etc/motd.d was added to PAM around pam-1.4.0. So RHEL 7.9 doesn't support /etc/motd.d. We should stop insights-client from creating /etc/motd.d/insights-client on RHEL 7.9. I'll open another bug for that. Hello, Does mean the insights-client will no longer touch the motd file? Is this available in 8.5.0-17 zstream? Could the fixed insights-client version be given as well? Bryan 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 (insights-client 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:3080 |