Bug 1240223
| Summary: | Prosody SELinux policy with GSS-API | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | baptiste.peugnez | ||||
| Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.1 | CC: | baptiste.peugnez, g.fhnrunznrqeqf, ggiesen+redhat, lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde | ||||
| Target Milestone: | rc | Flags: | lvrabec:
needinfo-
|
||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | selinux-policy-3.13.1-35.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-11-19 10:38:46 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: | |||||||
| Attachments: |
|
||||||
|
Description
baptiste.peugnez
2015-07-06 09:23:18 UTC
Could you provide the list of SELinux denials which appear when you run the scenario in enforcing and in permissive mode? # ausearch -m avc -m user_avc -m selinux_err -i -ts today Thank you. Created attachment 1049189 [details]
ausearch permissive selinux prosody with gss-api
I uploaded the file with the list of SELinux denials in permissive mode. 997 here is the uid of the prosody user and could change on another system. We can also change the emplacement of the kerberos replay cache file through the KRB5RCACHEDIR environment variable e.g. KRB5RCACHEDIR=/var/run/prosody The tmp_t accesses needed are the same as any gss-api enabled applications (dovecot, postfix..). What is the recommandation for these? commit eaf09a7880e465b25d3d3519088d693a5ad7a624
Author: Lukas Vrabec <lvrabec>
Date: Sat Jul 18 20:09:23 2015 +0200
Allow prosody to create own tmp files/dirs.
commit e67958120f2612ca9edc113a639016099440cf48
Author: Lukas Vrabec <lvrabec>
Date: Sat Jul 18 21:58:34 2015 +0200
Add prosody_stream_connect() interface.
commit cca55bbc335dfa44564e3fa7e8ce1f8a6b06d7c2
Author: Lukas Vrabec <lvrabec>
Date: Sat Jul 18 22:05:35 2015 +0200
Allow stream connect logrotate to prosody.
Added related rules. Could you attach output: $ ls -Z /var/log/prosody Thank you. Any update here? Sorry, Baptiste is off for a while and I've been slacking We have this kind of files: -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.debug -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.debug-20150705.gz -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.debug-20150705.gz-20150719 -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.debug-20150712-20150719 -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.debug-20150712.gz -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.debug-20150720 -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.err -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.err-20150710 -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.err-20150710-20150720 -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.log -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.log-20150705.gz -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.log-20150705.gz-20150719 -rw-r-----. prosody prosody unconfined_u:object_r:var_log_t:s0 prosody.log-20150720 (. . . that logrotate configuration is apparently also screwed up) We have a local policy that gives prosody access to var_log_t, but as said in the bug report bz #1221587 should have fixed that (by adding prosody_log_t) Is there anywhere we can get an updated version until redhat 7.2 gets out? Thank you,
Please use:
# restorecon -R -v /var/log/prosody
And then try to reproduce this issue. THis should fix problem with this rule:
allow prosody_t var_log_t:file { open read };
This means all related rules was added. Moving to Modified.
"restorecon -R -v /var/log/prosody" doesn't do anything since the policy currently available for rhel 7 (3.13.1-23.el7_1.8) still has these files as var_log_t. I'm not quite sure why that log rule happened, please ignore it for now, it's just all a big mess because there's nowhere where we can get the selinux updates from both bz. I had to look at the latest fedora koji builds to get an srpm after the appropriate changelogs (with the messages you posted here), and run a diff of both rpmbuild-prepared directories to look for what has actually been done... Anyway, I'm not quite sure why you had to add a prosody_stream_connect interface and use it with logrotate_t (since the logrotate configuration uses systemctl reload), I guess we weren't clear with the original point about having to check if logrotate had been updated? Do you have AVC related to this rule? allow logrotate_t prosody_var_run_t:file write; The files are currently var_log_t with an exception to prosody_t to write to them until we can upgrade the policy (either rebuilding ourselves or update made available) Now I looked at the update from pervious ticket I think it'll work (logging_log_file should do it), it's just hard to tell what's done with a commit message when we don't have access to the repository... Anyway, I think what we reported should have been fixed now and I'll re-open a ticket if something is missing after the update is available, unless you have a way for us to test selinux-policy-3.13.1-35.el7 earlier. Thank you, -- Dominique I tested this on my system, it looks good. [root@ibm-x3650m4-01-vm-09 prosody]# ls -Z -rw-r-----. prosody prosody system_u:object_r:prosody_log_t:s0 prosody.err -rw-r-----. prosody prosody system_u:object_r:prosody_log_t:s0 prosody.log [root@ibm-x3650m4-01-vm-09 prosody]# pwd /var/log/prosody 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, 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://rhn.redhat.com/errata/RHBA-2015-2300.html |