Bug 2218279
| Summary: | sos clean - Respect permissions of sanitised files | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Jan Jansky <jjansky> | |
| Component: | sos | Assignee: | Pavel Moravec <pmoravec> | |
| Status: | CLOSED ERRATA | QA Contact: | Daniel Záležák <dzalezak> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 8.8 | CC: | agk, dzalezak, jcastillo, jjansky, mhradile, pgm-rhel-tools, plambri, sbradley, theute, toneata | |
| Target Milestone: | rc | Keywords: | Triaged, ZStream | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | sos-4.5.5-2.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2221104 (view as bug list) | Environment: | ||
| Last Closed: | 2023-07-26 08:37:56 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2221104 | |||
|
Description
Jan Jansky
2023-06-28 14:30:19 UTC
Trivial reproducer:
1) Ensure /etc/hosts has system's FQDN, e.g. add there:
echo $(ip a | grep -v "127.0.0.1/8" | grep -m1 "inet " | cut -d/ -f1 | awk '{ print $2 }') $(hostname -f) $(hostname -s) >> /etc/hosts
2) Run:
# sos report --clean -o networking --batch --build
..
Your sosreport build tree has been generated in:
/var/tmp/sosreport-host4-8675309-2023-06-28-cxezxnp
3) Compare permissions:
# ll /etc/hosts /var/tmp/sosreport-host4-8675309-2023-06-28-cxezxnp/etc/hosts
-rw-r--r--. 1 root root 1134 Jun 12 08:37 /etc/hosts
-rw-------. 1 root root 798 Jun 28 16:49 /var/tmp/sosreport-host4-8675309-2023-06-28-cxezxnp/etc/hosts
#
See the missing go+r flags.
Switched Tested based on positive results from manual test:
OLD
RHEL-8.9
x86_64
sos-4.5.1-3.el8.noarch
# echo $(ip a | grep -v "127.0.0.1/8" | grep -m1 "inet " | cut -d/ -f1 | awk '{ print $2 }') $(hostname -f) $(hostname -s) >> /etc/hosts
# sos report --clean -o networking --batch --build
# ll /etc/hosts /var/tmp/sosreport-host0-2023-07-05-ihejuje/etc/host66
-rw-r--r--. 1 root root 304 Jul 5 14:35 /etc/hosts
-rw-------. 1 root root 202 Jul 5 14:29 /var/tmp/sosreport-host0-2023-07-05-ihejuje/etc/host66
``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
NEW
RHEL-8.9
x86_64
sos-4.5.5-1.el8.noarch
# echo $(ip a | grep -v "127.0.0.1/8" | grep -m1 "inet " | cut -d/ -f1 | awk '{ print $2 }') $(hostname -f) $(hostname -s) >> /etc/hosts
# sos report --clean -o networking --batch --build
# ll /etc/hosts /var/tmp/sosreport-host0-2023-07-05-peqncnf/etc/host66
-rw-r--r--. 1 root root 377 Jul 5 14:37 /etc/hosts
-rw-r--r--. 1 root root 290 Jul 5 14:37 /var/tmp/sosreport-host0-2023-07-05-peqncnf/etc/host66
*** Bug 2221104 has been marked as a duplicate of this bug. *** 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 (sos 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-2023:4279 |