Bug 947667 - SELinux is preventing /usr/sbin/usbmuxd from 'write' accesses on the file usbmuxd.pid.
Summary: SELinux is preventing /usr/sbin/usbmuxd from 'write' accesses on the file usb...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:d08543b38b1b56ff5b9b6b31803...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-03 00:54 UTC by Mengxuan Xia
Modified: 2013-04-03 09:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-03 09:18:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mengxuan Xia 2013-04-03 00:54:03 UTC
Description of problem:
SELinux is preventing /usr/sbin/usbmuxd from 'write' accesses on the file usbmuxd.pid.

*****  Plugin catchall (100. confidence) suggests  ***************************

If 您确定应默认允许 usbmuxd write 访问 usbmuxd.pid file。
Then 您应该将这个情况作为 bug 报告。
您可以生成本地策略模块允许这个访问。
Do
请执行以下命令此时允许这个访问:
# grep usbmuxd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:usbmuxd_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                usbmuxd.pid [ file ]
Source                        usbmuxd
Source Path                   /usr/sbin/usbmuxd
Port                          <未知>
Host                          (removed)
Source RPM Packages           usbmuxd-1.0.8-2.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-167.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.8.3-103.fc17.x86_64 #1 SMP Mon
                              Mar 18 15:46:01 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-04-02 20:50:21 EDT
Last Seen                     2013-04-02 20:50:23 EDT
Local ID                      93597e9e-7fee-44cb-8d76-4053dce1df03

Raw Audit Messages
type=AVC msg=audit(1364950223.685:1629): avc:  denied  { write } for  pid=9190 comm="usbmuxd" name="usbmuxd.pid" dev="tmpfs" ino=1610446 scontext=system_u:system_r:usbmuxd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1364950223.685:1629): arch=x86_64 syscall=open success=no exit=EACCES a0=40865a a1=41 a2=1a4 a3=7fff87464a50 items=0 ppid=9143 pid=9190 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=usbmuxd exe=/usr/sbin/usbmuxd subj=system_u:system_r:usbmuxd_t:s0-s0:c0.c1023 key=(null)

Hash: usbmuxd,usbmuxd_t,var_run_t,file,write

audit2allow

#============= usbmuxd_t ==============
allow usbmuxd_t var_run_t:file write;

audit2allow -R

#============= usbmuxd_t ==============
allow usbmuxd_t var_run_t:file write;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.8.3-103.fc17.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-04-03 09:18:39 UTC
Did you run usbmuxd directly? You will need to fix labeling on /var/run/usbmuxd*

# restorecon -R -v /var/run/usbmuxd*

Should fix your problem.


Note You need to log in before you can comment on or make changes to this bug.