Bug 2230857
| Summary: | MLS: logging in through ssh as root ends up being "staff_t" instead of "sysadm_t" | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Renaud Métrich <rmetrich> |
| Component: | selinux-policy | Assignee: | Nikola Knazekova <nknazeko> |
| Status: | NEW --- | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9.2 | CC: | lvrabec, mmalik, zpytela |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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
Renaud Métrich
2023-08-10 07:40:01 UTC
The root cause is the below line in /etc/selinux/mls/contexts/users/root: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # # Uncomment if you want to automatically login as sysadm_r # #system_r:sshd_t:s0 unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0 -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- I think this is non-sense because logging in as root with default staff_t context makes the root user become unusable. Anyway, either the documentation of this line has to be modified. |