Bug 1778361
| Summary: | rpm --restore is applying incorrect file capability attributes | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | ubertux <ryangbowen> |
| Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
| Status: | CLOSED DUPLICATE | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 | CC: | pmatilai |
| Target Milestone: | rc | ||
| Target Release: | 8.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-12-03 15:36:37 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
ubertux
2019-11-30 09:28:56 UTC
Some additional information: I've run 'rpm --setugids sudo' and this sets the correct capabilities on the files but it sets incorrect permissions (note the lack of suid on /usr/bin/sudo): [root@rhel8 ~]# ls -laZ /usr/bin/sudo ---s--x--x. 1 root root system_u:object_r:sudo_exec_t:s0 166064 Aug 19 13:15 /usr/bin/sudo [root@rhel8 ~]# rpm --setugids sudo [root@rhel8 ~]# ls -laZ /usr/bin/sudo ---x--x--x. 1 root root system_u:object_r:sudo_exec_t:s0 166064 Aug 19 13:15 /usr/bin/sudo Attempting to 'sudo su -' as a non-root user at this point gives the following error: $ sudo su - sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set $ Running 'rpm --setperms sudo' at this point sets the right permissions and I am able to 'sudo su -' as a non-root user: [root@rhel8 ~]# rpm --setperms sudo [root@rhel8 ~]# ls -laZ /usr/bin/sudo ---s--x--x. 1 root root system_u:object_r:sudo_exec_t:s0 166064 Aug 19 13:15 /usr/bin/sudo Order seems important. Running 'setperms' before 'setugids' fixes permissions but doesn't fix capabilities. 'setugids' then sets incorrect file permissions by not setting the suid bit. *** This bug has been marked as a duplicate of bug 1700920 *** |