Bug 830634 - SELinux is preventing /usr/libexec/totem-plugin-viewer from 'rmdir' accesses on the directory /home/ksugawar/.nv/GLCache/7627299e856060b7a1cf3345db62a833.
SELinux is preventing /usr/libexec/totem-plugin-viewer from 'rmdir' accesses ...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-11 00:03 EDT by Ken Sugawara
Modified: 2012-11-26 10:54 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-16 20:04:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
File: description (2.82 KB, text/plain)
2012-06-11 00:03 EDT, Ken Sugawara
no flags Details

  None (edit)
Description Ken Sugawara 2012-06-11 00:03:29 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.0-1.fc17.x86_64
time:           2012年06月11日 13時02分21秒

description:    Binary file, 2892 bytes
Comment 1 Ken Sugawara 2012-06-11 00:03:32 EDT
Created attachment 590811 [details]
File: description
Comment 2 Miroslav Grepl 2012-06-11 05:14:51 EDT
Try to execute

chcon -R -t cache_home_t /home/ksugawar/.nv

Fixed in selinux-policy-3.10.0-130.fc17
Comment 3 Fedora Update System 2012-06-11 17:02:32 EDT
selinux-policy-3.10.0-130.fc17 has been submitted as an update for Fedora 17.
Comment 4 Fedora Update System 2012-06-15 19:59:31 EDT
Package selinux-policy-3.10.0-130.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-130.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2012-06-16 20:04:28 EDT
selinux-policy-3.10.0-130.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Frédéric Bron 2012-11-18 15:31:11 EST
I have this issue with an up-to-date Fedora 17 (I regularly perform yum update). Why? Cannot open .mp3 files from firefox (16.0.2).
Comment 7 Miroslav Grepl 2012-11-19 05:14:38 EST
what does

# ls -dZ /home/ksugawar/.nv

# matchpathcon /home/ksugawar/.nv
Comment 8 Frédéric Bron 2012-11-19 13:43:14 EST
> what does
> # ls -dZ /home/ksugawar/.nv

drwx------. fred fred unconfined_u:object_r:cache_home_t:s0 /home/fred/.nv/

# matchpathcon /home/ksugawar/.nv

/home/fred/.nv	unconfined_u:object_r:cache_home_t:s0
Comment 9 Miroslav Grepl 2012-11-26 10:47:38 EST
Which is correct. Are you still getting this issue?
Comment 10 Frédéric Bron 2012-11-26 10:54:50 EST
Yes. But maybe it is just that I do not understand what to do when SELinux is complaining. I admit that it is a bit obscure to me. Here is the full report of SELinux, does it help?

SELinux is preventing /usr/libexec/totem-plugin-viewer from rmdir access on the directory /home/fred/.nv/GLCache/ec60e4935cf086521f038c12e69f37c0.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/home/fred/.nv/GLCache/ec60e4935cf086521f038c12e69f37c0 default label should be cache_home_t.
Then you can run restorecon.
# /sbin/restorecon -v /home/fred/.nv/GLCache/ec60e4935cf086521f038c12e69f37c0

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that totem-plugin-viewer should be allowed rmdir access on the ec60e4935cf086521f038c12e69f37c0 directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep totem-plugin-vi /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/fred/.nv/GLCache/ec60e4935cf086521f038c12e69
                              f37c0 [ dir ]
Source                        totem-plugin-vi
Source Path                   /usr/libexec/totem-plugin-viewer
Port                          <Inconnu>
Host                          casalibus
Source RPM Packages           totem-mozplugin-3.4.3-1.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-161.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     casalibus
Platform                      Linux casalibus 3.6.7-4.fc17.x86_64 #1 SMP Tue Nov
                              20 19:40:01 UTC 2012 x86_64 x86_64
Alert Count                   3
First Seen                    2012-11-26 16:50:00 CET
Last Seen                     2012-11-26 16:52:47 CET
Local ID                      e8ef4571-c5ad-4e1c-9880-6eebf2df9030

Raw Audit Messages
type=AVC msg=audit(1353945167.814:235): avc:  denied  { rmdir } for  pid=24369 comm="totem-plugin-vi" name="ec60e4935cf086521f038c12e69f37c0" dev="sdb1" ino=15991468 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir

type=SYSCALL msg=audit(1353945167.814:235): arch=x86_64 syscall=rmdir success=no exit=EACCES a0=7fff6ceed570 a1=7fff6ceed570 a2=15 a3=5 items=0 ppid=1 pid=24369 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=totem-plugin-vi exe=/usr/libexec/totem-plugin-viewer subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: totem-plugin-vi,mozilla_plugin_t,user_home_t,dir,rmdir


#============= mozilla_plugin_t ==============
allow mozilla_plugin_t user_home_t:dir rmdir;

audit2allow -R

#============= mozilla_plugin_t ==============
allow mozilla_plugin_t user_home_t:dir rmdir;

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