Bug 1823672
| Summary: | rsyslog "omfile" cannot append to custom file locations | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Renaud Métrich <rmetrich> |
| Component: | selinux-policy | Assignee: | Zdenek Pytela <zpytela> |
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 8.1 | CC: | lvrabec, mmalik, plautrba, ssekidde |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.4 | Flags: | pm-rhel:
mirror+
|
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: |
Feature:
A new logging_syslogd_append_public_content tunable was added to the policy to allow to search the parent directories of logfiles with customized path and to append to files labeled public_content_rw_t when logs are exported using http or ftp.
Reason:
When the rsyslogd service is set to use a logfile in an arbitrary path, the permission to search the logfile parent directories may not be allowed.
To enable exporting of logs labeled public_content_rw_t using http or ftp, also the append permission to files with the public_content_rw_t type is needed.
Result:
After turning the logging_syslogd_append_public_content tunable on, the rsyslogd service is able to work with logfiles in an arbitrary path.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-05-18 14:57: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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1894575 | ||
|
Description
Renaud Métrich
2020-04-14 08:32:50 UTC
Renaud, This is the solution as agreed in our team: There will be a boolean allowing syslogd_t append permissions to public_content_rw_t:file and search permissions to non_security_file_type:dir. This boolean will be off by default. Is this acceptable? I am also curious if alternative solutions were considered, e. g. using bind mounts were considered for this use case. Hi Zdenek, I'm ok with the boolean to write to http public content. For "searching non_security_file_type dirs", I think this should be available by default. Using bind mounts is an alternative but it's too complicated / error prone: indeed rsyslog doesn't depend on the network, so if we tell customers to bind mounts for that, we surely will have ordering cycles created, e.g. when bind mounting NFS file systems. I've submitted a Fedora PR to address the issue: https://github.com/fedora-selinux/selinux-policy/pull/477 The search rule is conditionally allowed, too: syslogd_t is allowed to search on all base file types which can appear at the top directory level. 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 (selinux-policy 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:1639 |