Bug 741042
Summary: | [abrt] xen-4.1.1-3.fc15: tempfile.py:201:_get_default_tempdir:IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/etc/rc.d/init.d'] | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andrew Engelbrecht <andrew> |
Component: | selinux-policy-targeted | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED WONTFIX | QA Contact: | Ben Levenson <benl> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 15 | CC: | berrange, dwalsh, geminic86, jforbes, kraxel, m.a.young, vindicators, virt-maint, xen-maint |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Unspecified | ||
Whiteboard: | abrt_hash:4f10bc60ec439607725d051865797c90a34052de | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-07 17:20:20 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Andrew Engelbrecht
2011-09-24 15:52:46 UTC
I suspect this due to selinux blocking xm in some circumstances. Does the same thing happen if you run setenforce 0 beforehand? You were right, there is no issue when selinux is disabled. Here's the details of the violation if selinux is enabled: SELinux is preventing /usr/bin/python from append access on the file tmpzy3mkl-xend.log. ***** Plugin catchall (100. confidence) suggests *************************** If you believe that python should be allowed append access on the tmpzy3mkl-xend.log 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 xm /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context unconfined_u:system_r:virsh_t:s0 Target Context unconfined_u:object_r:tmp_t:s0 Target Objects tmpzy3mkl-xend.log [ file ] Source xm Source Path /usr/bin/python Port <Unknown> Host igo Source RPM Packages python-2.7.1-7.fc15 Target RPM Packages Policy RPM selinux-policy-3.9.16-38.fc15 Selinux Enabled True Policy Type targeted Enforcing Mode Permissive Host Name igo Platform Linux igo 2.6.40.4-5.fc15.x86_64 #1 SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64 Alert Count 1 First Seen Tue 27 Sep 2011 05:15:44 PM EDT Last Seen Tue 27 Sep 2011 05:15:44 PM EDT Local ID 8db220c1-d5e9-414f-9adb-3db21a3e94f5 Raw Audit Messages type=AVC msg=audit(1317158144.473:539): avc: denied { append } for pid=18326 comm="xm" name="tmpzy3mkl-xend.log" dev=sda1 ino=51302 scontext=unconfined_u:system_r:virsh_t:s0 tcontext=unconfined_u:object_r:tmp_t:s0 tclass=file type=SYSCALL msg=audit(1317158144.473:539): arch=x86_64 syscall=open success=yes exit=ENXIO a0=2b3b560 a1=441 a2=1b6 a3=9 items=0 ppid=18325 pid=18326 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts1 ses=1 comm=xm exe=/usr/bin/python subj=unconfined_u:system_r:virsh_t:s0 key=(null) Hash: xm,virsh_t,tmp_t,file,append audit2allow #============= virsh_t ============== allow virsh_t tmp_t:file append; audit2allow -R #============= virsh_t ============== allow virsh_t tmp_t:file append; Package: xen-4.1.2-1.fc16 Architecture: x86_64 OS Release: Fedora release 16 (Verne) Comment ----- No reason *** Bug 770631 has been marked as a duplicate of this bug. *** Reassigning to selinux. How is "tmpzy3mkl-xend.log" file created? And why is located in /tmp rather than in the /var/log/xen directory? It is a fall back location if the regular log file can't be opened - the python code from XendLogging.py is try: fileHandler = openFileHandler(filename) logfilename = filename except IOError: logfilename = tempfile.mkstemp("-xend.log")[1] fileHandler = openFileHandler(logfilename) This probably means xend is run as non-root and is unlikely to do anything useful. Xend is being deprecated anyway so perhaps it makes sense just to catch the backtrace and return an ordinary error if selinux stops the file being created. Looks to me like this file got created when the system was in permissive mode. tmp_t is not a label that we should see,if a domain was allowed to create a file in /tmp. The question is what labeled process created tmpzy3mkl-xend.log? 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 |