Description of problem: Trying to run "wine cmd" as a user_u user. SELinux is preventing /usr/bin/wine-preloader from 'create' accesses on the directory . ***** Plugin catchall (100. confidence) suggests ************************** If você acredita que o wine-preloader deva ser permitido acesso de create em directory 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 rundll32.exe /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:cache_home_t:s0 Target Objects [ dir ] Source rundll32.exe Source Path /usr/bin/wine-preloader Port <Unknown> Host (removed) Source RPM Packages wine-core-1.7.24-1.fc20.i686 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 39 First Seen 2014-09-07 18:56:41 BRT Last Seen 2014-09-07 18:56:44 BRT Local ID 06c365e8-e3e8-4fa7-a6e3-ba0175fdaae4 Raw Audit Messages type=AVC msg=audit(1410127004.646:476): avc: denied { create } for pid=3256 comm="rundll32.exe" name="fontconfig" scontext=user_u:user_r:user_wine_t:s0 tcontext=user_u:object_r:cache_home_t:s0 tclass=dir type=SYSCALL msg=audit(1410127004.646:476): arch=i386 syscall=getpid success=no exit=EACCES a0=7d49b6f0 a1=1ed a2=7e9aa000 a3=7d49b6f0 items=0 ppid=1 pid=3256 auid=1002 uid=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=2 comm=rundll32.exe exe=/usr/bin/wine-preloader subj=user_u:user_r:user_wine_t:s0 key=(null) Hash: rundll32.exe,user_wine_t,cache_home_t,dir,create Additional info: reporter: libreport-2.2.3 hashmarkername: setroubleshoot kernel: 3.15.10-201.fc20.x86_64 type: libreport
Where is a path to "rundll32.exe" in your homedir?
Any chance your homedir was mislabeled? Are you able reproduce it?
(In reply to Miroslav Grepl from comment #1) > Where is a path to "rundll32.exe" in your homedir? They are created by wine itself. There are two copies: ~/.wine/drive_c/windows/syswow64/rundll32.exe ~/.wine/drive_c/windows/system32/rundll32.exe Both have label user_u:object_r:wine_home_t:s0. (In reply to Miroslav Grepl from comment #2) > Any chance your homedir was mislabeled? Are you able reproduce it? It was a fresh user created with "useradd -Z user_u", and I had done nothing other than logging into KDE and running "wine cmd"; only after reporting this bug I did the workaround of running wine once as unconfined_u (see bug 1139062). For the homedir to be mislabeled, something else would need to be wrong. Since wine already finished its "first run" routine (as unconfined_u), and I already used it a lot (as unconfined_u), I cannot reproduce this anymore with that user. To reproduce it, I would need to create a new user_u user and run "wine cmd" on it. If you still need it, tell me what to look for and I'll do it tonight with a fresh user account.
Ah I missed "user_u". Strange, it should be created with correct labeling $ sesearch -T -s user_t |grep \".wine type_transition user_t user_home_dir_t : dir wine_home_t ".wine"; What does sesearch show you?
(In reply to Miroslav Grepl from comment #4) > Ah I missed "user_u". Strange, it should be created with correct labeling > > $ sesearch -T -s user_t |grep \".wine > type_transition user_t user_home_dir_t : dir wine_home_t ".wine"; > > What does sesearch show you? It shows the same thing. But I don't think it's relevant. If I'm reading the AVC correctly, the problem is not with rundll32.exe or the .wine directory (which was correctly labeled, I checked); the problem is with some file or directory called "fontconfig" within cache_home_t (which I presume is ~/.cache or a subdirectory of it). Perhaps wine-preloader (wine's "first run" thing), which is running as user_wine_t, doesn't have the selinux permission to create that file/directory; I don't know the right selinux command to check if that rule exists or is missing.
Miroslav, the problem is user_usertype is not allowed to create user_home_type and cache_home_t directories.
41efd0e1352f911ce70f229736b48748a34a268e should fix this problem.
Dan, one of the problem was mislabeled ~/.wine (another bug related to this one).
And also this is about user_wine_t agains user_t.
commit f8b4bb1c57989d89ce2a2a999d57ca3ada32d40b Author: Miroslav Grepl <mgrepl> Date: Mon Sep 15 10:18:25 2014 +0200 Allow wine domains to create cache dirs. is going to fix this bug.
https://github.com/selinux-policy/selinux-policy/commit/706bd7d0d4ce2ed06b5e5615f584b8850e8ea99b
selinux-policy-3.12.1-186.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-186.fc20
Package selinux-policy-3.12.1-186.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-186.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-11479/selinux-policy-3.12.1-186.fc20 then log in and leave karma (feedback).
selinux-policy-3.12.1-187.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-187.fc20
selinux-policy-3.12.1-188.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-188.fc20
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.