Bug 1964766
| Summary: | selinux is blocking gpsd without giving warning message | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | laolux |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 34 | CC: | dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, vmojzis, zpytela |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| 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: | 2022-06-08 06:20:54 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
laolux
2021-05-26 03:44:41 UTC
Ok, some more info. When I copy gpsd to a different directory, then its selinux context gets changed. That's why it works. However, if I clone the original context with chcon, then it fails, regardless of the directory that gpsd is in. The context is 'system_u:object_r:gpsd_exec_t:s0', so I suppose that 'gpsd_exec_t' has some issues. Can you enable the daemons_use_tty boolean and re-run the gpsd program? # setsebool daemons_use_tty on That should work. However, I have fixed it.
Trick was to
# semodule -DB
then sealert would report two errors and create a policy to fix that.
Policy as follows:
module my-gpsd 1.0;
require {
type user_devpts_t;
type gpsd_t;
class chr_file { append read write };
}
#============= gpsd_t ==============
#!!!! This avc can be allowed using the boolean 'daemons_use_tty'
allow gpsd_t user_devpts_t:chr_file { append read write };
I really wish selinux would be more verbose when it is blocking something. I can fully understand that people recommend setenforce 0, just in case selinux blocks something and does not report it.
This message is a reminder that Fedora Linux 34 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '34'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 34 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07. Fedora Linux 34 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. Thank you for reporting this bug and we are sorry it could not be fixed. |