Bug 1036431 - SELinux is preventing /usr/sbin/rpc.mountd from 'ioctl' accesses on the blk_file /dev/bcache0.
Summary: SELinux is preventing /usr/sbin/rpc.mountd from 'ioctl' accesses on the blk_f...
Keywords:
Status: CLOSED DUPLICATE of bug 1036430
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:14474510a64592d34ff9798b3bb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-02 00:01 UTC by Martin
Modified: 2014-09-15 00:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-02 16:35:49 UTC
Type: ---


Attachments (Terms of Use)

Description Martin 2013-12-02 00:01:40 UTC
Description of problem:
mounting NFS share from another machine
bcache0 is SSD cache, see: http://fedoraproject.org/wiki/Changes/SSD_cache
SELinux is preventing /usr/sbin/rpc.mountd from 'ioctl' accesses on the blk_file /dev/bcache0.

*****  Plugin device (91.4 confidence) suggests   ****************************

If you want to allow rpc.mountd to have ioctl access on the bcache0 blk_file
Then you need to change the label on /dev/bcache0 to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE '/dev/bcache0'
# restorecon -v '/dev/bcache0'

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that rpc.mountd should be allowed ioctl access on the bcache0 blk_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 rpc.mountd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:nfsd_t:s0
Target Context                system_u:object_r:device_t:s0
Target Objects                /dev/bcache0 [ blk_file ]
Source                        rpc.mountd
Source Path                   /usr/sbin/rpc.mountd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nfs-utils-1.2.8-6.0.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-105.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.11.9-300.fc20.x86_64 #1 SMP Wed
                              Nov 20 22:23:25 UTC 2013 x86_64 x86_64
Alert Count                   3
First Seen                    2013-12-01 22:49:47 CET
Last Seen                     2013-12-02 00:15:28 CET
Local ID                      001d9aa6-db2d-4118-a332-a175e12aad0e

Raw Audit Messages
type=AVC msg=audit(1385939728.209:1576): avc:  denied  { ioctl } for  pid=32246 comm="rpc.mountd" path="/dev/bcache0" dev="devtmpfs" ino=15057 scontext=system_u:system_r:nfsd_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=blk_file


type=SYSCALL msg=audit(1385939728.209:1576): arch=x86_64 syscall=ioctl success=yes exit=0 a0=c a1=80081272 a2=7f57a639ac20 a3=1 items=0 ppid=1 pid=32246 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=rpc.mountd exe=/usr/sbin/rpc.mountd subj=system_u:system_r:nfsd_t:s0 key=(null)

Hash: rpc.mountd,nfsd_t,device_t,blk_file,ioctl

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.9-300.fc20.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-12-02 16:35:49 UTC

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


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