Bug 1139062

Summary: SELinux is preventing /usr/bin/wine-preloader from 'read' accesses on the lnk_file .
Product: [Fedora] Fedora Reporter: Cesar Eduardo Barros <cesarb>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5232fc1c4a170d88b5a846b1ba919113e55a43531870368b307b6b09c463714c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-08 06:45:35 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 Cesar Eduardo Barros 2014-09-07 22:32:47 UTC
Description of problem:
See bug 1139060. I changed the user to "unconfined_u", ran "wine cmd" to create the .wine directory correctly, changed the user back to "user_u", and tried to run "wine cmd" again.
SELinux is preventing /usr/bin/wine-preloader from 'read' accesses on the lnk_file .

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

If você acredita que o wine-preloader deva ser permitido acesso de read em  lnk_file  por default.
Then você precisa reportar este como um erro.
Você pode gerar um módulo de política local para permitir este acesso.
Do
permitir este acesso agora executando:
# grep wine /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                user_u:user_r:user_wine_t:s0
Target Context                user_u:object_r:wine_home_t:s0
Target Objects                 [ lnk_file ]
Source                        wine
Source Path                   /usr/bin/wine-preloader
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-182.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.15.10-201.fc20.x86_64 #1 SMP Wed
                              Aug 27 21:10:06 UTC 2014 x86_64 x86_64
Alert Count                   4
First Seen                    2014-09-07 19:29:12 BRT
Last Seen                     2014-09-07 19:29:12 BRT
Local ID                      313c0256-8d40-449a-9cc1-be637d872b2e

Raw Audit Messages
type=AVC msg=audit(1410128952.419:3881): avc:  denied  { read } for  pid=7273 comm="wineboot.exe" name="c:" dev="dm-3" ino=4718851 scontext=user_u:user_r:user_wine_t:s0 tcontext=user_u:object_r:wine_home_t:s0 tclass=lnk_file


Hash: wine,user_wine_t,wine_home_t,lnk_file,read

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.15.10-201.fc20.x86_64
type:           libreport

Comment 1 Cesar Eduardo Barros 2014-09-07 22:48:53 UTC
Worked around with the following audit2allow output:

module wine-dosdevices 1.0;

require {
        type user_wine_t;
        type wine_home_t;
        class lnk_file { read create };
}

#============= user_wine_t ==============
allow user_wine_t wine_home_t:lnk_file { read create };

Comment 2 Miroslav Grepl 2014-09-08 06:45:35 UTC

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