Bug 1110108

Summary: SELinux is preventing /usr/games/nethack-3.4.3/nethack from 'write' accesses on the directory .
Product: [Fedora] Fedora Reporter: Casey Dahlin <cdahlin>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl, vanhoof
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:3acb075706751843d9a179508559bfde004cea3472cb6d96fef18148f6977783
Fixed In Version: selinux-policy-3.12.1-171.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-26 01:54:03 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 Casey Dahlin 2014-06-17 04:38:27 UTC
Description of problem:
Happens immediately upon launching nethack
SELinux is preventing /usr/games/nethack-3.4.3/nethack from 'write' accesses on the directory .

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

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

Additional Information:
Source Context                staff_u:staff_r:staff_t:s0-s0:c0.c1023
Target Context                system_u:object_r:games_data_t:s0
Target Objects                 [ dir ]
Source                        nethack
Source Path                   /usr/games/nethack-3.4.3/nethack
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nethack-3.4.3-29.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-158.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.14.3-200.fc20.x86_64 #1 SMP Tue
                              May 6 19:00:18 UTC 2014 x86_64 x86_64
Alert Count                   3
First Seen                    2014-06-17 00:35:44 EDT
Last Seen                     2014-06-17 00:36:58 EDT
Local ID                      ad595e9a-eeef-4641-b4ea-671b6a226742

Raw Audit Messages
type=AVC msg=audit(1402979818.393:3836): avc:  denied  { write } for  pid=20642 comm="nethack" name="nethack" dev="dm-0" ino=1718374 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:games_data_t:s0 tclass=dir


type=SYSCALL msg=audit(1402979818.393:3836): arch=x86_64 syscall=link success=no exit=EACCES a0=7e2fa0 a1=7e33a0 a2=6b a3=7ffffbf9d650 items=0 ppid=28102 pid=20642 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=20 sgid=20 fsgid=20 tty=pts5 ses=1 comm=nethack exe=/usr/games/nethack-3.4.3/nethack subj=staff_u:staff_r:staff_t:s0-s0:c0.c1023 key=(null)

Hash: nethack,staff_t,games_data_t,dir,write

Additional info:
reporter:       libreport-2.2.2
hashmarkername: setroubleshoot
kernel:         3.14.3-200.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-06-17 08:26:49 UTC
commit 59cbd254d4ab7dc16c8d583bcc22c443fd954070
Author: Miroslav Grepl <mgrepl>
Date:   Tue Jun 17 10:23:46 2014 +0200

    Allow unpriv users to manage games data files. Needed by nethack.

Comment 3 Fedora Update System 2014-06-19 13:19:13 UTC
selinux-policy-3.12.1-171.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-171.fc20

Comment 4 Fedora Update System 2014-06-19 22:53:23 UTC
Package selinux-policy-3.12.1-171.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-171.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7499/selinux-policy-3.12.1-171.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-06-26 01:54:03 UTC
selinux-policy-3.12.1-171.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.