Bug 1035421

Summary: SELinux is preventing /usr/bin/journalctl from 'read' accesses on the directory journal.
Product: [Fedora] Fedora Reporter: Rahul Sundaram <metherid>
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, rdieter, sevmek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:719985f90e5a13f18e8908821cde908c09ba3fdb609294bdc323fba772d9b6c0
Fixed In Version: selinux-policy-3.12.1-116.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-16 07:09:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Rahul Sundaram 2013-11-27 17:29:55 UTC
Description of problem:
SELinux is preventing /usr/bin/journalctl from 'read' accesses on the directory journal.

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

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

Additional Information:
Source Context                system_u:system_r:abrt_t:s0-s0:c0.c1023
Target Context                system_u:object_r:syslogd_var_run_t:s0
Target Objects                journal [ dir ]
Source                        journalctl
Source Path                   /usr/bin/journalctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-208-4.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-90.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.8-300.fc20.x86_64 #1 SMP Wed
                              Nov 13 16:34:27 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-11-27 11:14:32 EST
Last Seen                     2013-11-27 11:14:32 EST
Local ID                      9849697a-e5b9-4966-a48d-3b1a6450e2ae

Raw Audit Messages
type=AVC msg=audit(1385568872.44:67): avc:  denied  { read } for  pid=1476 comm="journalctl" name="journal" dev="tmpfs" ino=8422 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:syslogd_var_run_t:s0 tclass=dir


type=SYSCALL msg=audit(1385568872.44:67): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=7fff2bc0a720 a2=90800 a3=0 items=0 ppid=1473 pid=1476 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=journalctl exe=/usr/bin/journalctl subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)

Hash: journalctl,abrt_t,syslogd_var_run_t,dir,read

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.8-300.fc20.x86_64
type:           libreport

Comment 1 Rex Dieter 2013-12-12 03:53:45 UTC
Description of problem:
Configured systemd journal to be volatile, and started getting this error.

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.10-301.fc20.x86_64
type:           libreport

Comment 2 Miroslav Grepl 2013-12-12 14:20:47 UTC
*** Bug 1040748 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2013-12-12 14:25:51 UTC
commit 97360e961bee281e4b561bbf5195d93bf56a97c8
Author: Miroslav Grepl <mgrepl>
Date:   Thu Dec 12 15:25:21 2013 +0100

    Allow journalctl running as ABRT to read /run/log/journal

Comment 4 Yannick Defais 2013-12-30 09:58:54 UTC
Description of problem:
Hi,

I set systemd journal in RAM using this conf:

/etc/systemd/journald.conf

[Journal]
Storage=volatile
#Compress=yes
#Seal=yes
#SplitMode=login
#SyncIntervalSec=5m
#RateLimitInterval=30s
#RateLimitBurst=1000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
RuntimeMaxUse=10M

I suspect SELinux policies conflict with it.

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.12.5-302.fc20.x86_64
type:           libreport

Comment 5 Daniel Walsh 2014-01-02 22:31:22 UTC
Well this is actually abrt being triggered and running journal to gather the log messages.

Comment 6 Fedora Update System 2014-01-13 22:55:00 UTC
selinux-policy-3.12.1-116.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-116.fc20

Comment 7 Fedora Update System 2014-01-15 05:56:40 UTC
Package selinux-policy-3.12.1-116.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-116.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0806/selinux-policy-3.12.1-116.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-01-16 07:09:11 UTC
selinux-policy-3.12.1-116.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.