| Summary: | Problem with selinux and hibernation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | unmak1 | ||||
| Component: | pm-utils | Assignee: | Jaroslav Škarvada <jskarvad> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 15 | CC: | dwalsh, jskarvad, pknirsch, richard | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | i686 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-08-07 19:53:27 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
Can you run restorecon -R -v /var Then reopen if this happens again. Same error even with command that you have suggested.
If needed i can post dmesg.
SELinux is preventing /sbin/setfiles from read access on the file /run/pm-utils/locks/pm-powersave.lock.
***** Plugin restorecon (99.5 confidence) suggests *************************
If you want to fix the label.
/run/pm-utils/locks/pm-powersave.lock default label should be devicekit_var_run_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /run/pm-utils/locks/pm-powersave.lock
***** Plugin catchall (1.49 confidence) suggests ***************************
If you believe that setfiles should be allowed read access on the pm-powersave.lock file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep restorecon /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp
Additional Information:
Source Context unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c102
3
Target Context unconfined_u:object_r:var_run_t:s0
Target Objects /run/pm-utils/locks/pm-powersave.lock [ file ]
Source restorecon
Source Path /sbin/setfiles
Port <Unknown>
Host kronos
Source RPM Packages policycoreutils-2.0.86-7.fc15
Target RPM Packages pm-utils-1.4.1-6.fc15
Policy RPM selinux-policy-3.9.16-26.fc15
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name kronos
Platform Linux kronos 2.6.38.6-27.fc15.i686 #1 SMP Sun May
15 17:57:13 UTC 2011 i686 i686
Alert Count 3
First Seen Mon 06 Jun 2011 08:58:35 PM CEST
Last Seen Mon 06 Jun 2011 08:59:28 PM CEST
Local ID 93bc5b84-8b77-4b2b-ad19-27618037dd7d
Raw Audit Messages
type=AVC msg=audit(1307386768.155:67): avc: denied { read } for pid=1907 comm="restorecon" path="/run/pm-utils/locks/pm-powersave.lock" dev=tmpfs ino=39916 scontext=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file
type=SYSCALL msg=audit(1307386768.155:67): arch=i386 syscall=execve success=yes exit=0 a0=8569b88 a1=856d938 a2=8569de0 a3=856d938 items=0 ppid=1896 pid=1907 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm=restorecon exe=/sbin/setfiles subj=unconfined_u:unconfined_r:setfiles_t:s0-s0:c0.c1023 key=(null)
Hash: restorecon,setfiles_t,var_run_t,file,read
audit2allow
#============= setfiles_t ==============
allow setfiles_t var_run_t:file read;
audit2allow -R
#============= setfiles_t ==============
allow setfiles_t var_run_t:file read;
(In reply to comment #1)
> Can you run
>
> restorecon -R -v /var
>
> Then reopen if this happens again.
Looks like we need the same restorecon hack which we have for /var/log/pm-* files. I cannot reproduce this on fresh f15 install with pm-utils-1.4.1-8 (https://admin.fedoraproject.org/updates/pm-utils-1.4.1-8.fc15) and selinux-policy-3.9.16-26. But I added no work-around for pm-powersave.lock and the suspend/hibernate is still working for me without AVCs. Please recheck and report result. This message is a notice that Fedora 15 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 15. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '15' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 15 reached 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, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping |
Created attachment 503089 [details] The log of the error Description of problem: When I try to hibernate my system, The SELinux troubleshooter give me an error. I try to fix with creating the suggested policy but won't work. How reproducible: Steps to Reproduce: 1. pm-hibernate 2. wake up PC 3. and the error appears