Bug 1004707 - SELinux is preventing /usr/bin/gpg from 'write' accesses on the directory /home/tomspur/.gnupg.
Summary: SELinux is preventing /usr/bin/gpg from 'write' accesses on the directory /ho...
Keywords:
Status: CLOSED DUPLICATE of bug 887271
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:79c349a4a2a5771e66f175def71...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-05 09:53 UTC by Thomas Spura
Modified: 2013-09-05 15:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-05 15:35:34 UTC
Type: ---


Attachments (Terms of Use)

Description Thomas Spura 2013-09-05 09:53:44 UTC
Description of problem:
When starting firefox with the WebPG plugin, it seems to read my keyring through calling /usr/bin/gpg and this alert is appearing.
(I don't know why access is write though here...)
SELinux is preventing /usr/bin/gpg from 'write' accesses on the directory /home/tomspur/.gnupg.

*****  Plugin mozplugger (99.1 confidence) suggests  *************************

If you want to use the plugin package
Then you must turn off SELinux controls on the Firefox plugins.
Do
# setsebool -P unconfined_mozilla_plugin_transition 0

*****  Plugin catchall (1.81 confidence) suggests  ***************************

If you believe that gpg should be allowed write access on the .gnupg 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 gpg /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
                              0.c1023
Target Context                unconfined_u:object_r:gpg_secret_t:s0
Target Objects                /home/tomspur/.gnupg [ dir ]
Source                        gpg
Source Path                   /usr/bin/gpg
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnupg-1.4.14-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.10-200.fc19.x86_64 #1 SMP Thu
                              Aug 29 19:05:45 UTC 2013 x86_64 x86_64
Alert Count                   107
First Seen                    2013-08-08 16:55:03 CEST
Last Seen                     2013-09-04 17:15:10 CEST
Local ID                      ded1fe4a-ad74-4200-8949-cd0c05c41ffd

Raw Audit Messages
type=AVC msg=audit(1378307710.276:561): avc:  denied  { write } for  pid=22924 comm="gpg" name=".gnupg" dev="dm-2" ino=3539635 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:gpg_secret_t:s0 tclass=dir


type=SYSCALL msg=audit(1378307710.276:561): arch=x86_64 syscall=open success=no exit=EACCES a0=7fe3d3382370 a1=c1 a2=1a4 a3=0 items=0 ppid=1 pid=22924 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=1 tty=(none) comm=gpg exe=/usr/bin/gpg subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: gpg,mozilla_plugin_t,gpg_secret_t,dir,write

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.10-200.fc19.x86_64
type:           libreport

Potential duplicate: bug 887271

Comment 1 Daniel Walsh 2013-09-05 15:34:11 UTC
It is openeing the directory for write.

You probably need to turn off the transition if you want this plugin to work.  Since we really do not want plugins having the ability to write to this directory, we probably do not want them to read here either.

Comment 2 Daniel Walsh 2013-09-05 15:35:34 UTC

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


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