Bug 1128403

Summary: SELinux is preventing usbmuxd from 'write' accesses on the directory lib.
Product: [Fedora] Fedora Reporter: iliketurtlesbro
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, iliketurtlesbro, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1d74ad42a6e96a7932c866f27095d9f34b7d084544679f04effe5ca20f80c759
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-29 11:04:37 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 iliketurtlesbro 2014-08-10 06:09:17 UTC
Description of problem:
SELinux is preventing usbmuxd from 'write' accesses on the directory lib.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow usbmuxd to have write access on the lib directory
Then you need to change the label on lib
Do
# semanage fcontext -a -t FILE_TYPE 'lib'
where FILE_TYPE is one of the following: usbmuxd_var_run_t, var_run_t. 
Then execute: 
restorecon -v 'lib'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that usbmuxd should be allowed write access on the lib directory 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 usbmuxd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:usbmuxd_t:s0
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                lib [ dir ]
Source                        usbmuxd
Source Path                   usbmuxd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           filesystem-3.2-30.fc22.x86_64
Policy RPM                    selinux-policy-3.13.1-71.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.0-1.fc22.x86_64 #1 SMP Mon
                              Aug 4 10:01:23 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2014-08-10 01:33:14 EDT
Last Seen                     2014-08-10 02:02:04 EDT
Local ID                      1303fd57-e0ee-448f-bef5-edd4e23b6d90

Raw Audit Messages
type=AVC msg=audit(1407650524.765:553): avc:  denied  { write } for  pid=5080 comm="usbmuxd" name="lib" dev="dm-2" ino=1048578 scontext=system_u:system_r:usbmuxd_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=dir permissive=0


Hash: usbmuxd,usbmuxd_t,var_lib_t,dir,write

Version-Release number of selected component:
selinux-policy-3.13.1-71.fc22.noarch

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.0-1.fc22.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-08-12 12:33:12 UTC
Do you know which lib directory under /var/lib that usbmuxd is trying to write to?

Comment 2 Daniel Walsh 2014-08-29 11:04:37 UTC

*** This bug has been marked as a duplicate of bug 1135089 ***

Comment 3 iliketurtlesbro 2014-09-02 08:36:33 UTC
I'm sorry, I do not know which lib directory the process was attempting to write to.