Bug 1490295

Summary: SELinux is preventing systemd-journal from 'setattr' accesses on the file /var/log/journal/5a755c5e9a2346f5b8c38951388af976/user-1000.journal.
Product: [Fedora] Fedora Reporter: Florian Wallner <wallner>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dwalsh, lsm5, lvrabec, mgrepl, plautrba, pmoore, udickow
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:6f378cc6b4e5110b4464560285d79a7e5054e79e8195f4b82a4ae43b6472af60;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-24 15:55:45 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 Florian Wallner 2017-09-11 09:34:26 UTC
Description of problem:
Starting my computer after installing the updates
SELinux is preventing systemd-journal from 'setattr' accesses on the file /var/log/journal/5a755c5e9a2346f5b8c38951388af976/user-1000.journal.

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

If you want to fix the label. 
/var/log/journal/5a755c5e9a2346f5b8c38951388af976/user-1000.journal default label should be var_log_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/log/journal/5a755c5e9a2346f5b8c38951388af976/user-1000.journal

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

If you believe that systemd-journal should be allowed setattr access on the user-1000.journal file 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:
# ausearch -c 'systemd-journal' --raw | audit2allow -M my-systemdjournal
# semodule -X 300 -i my-systemdjournal.pp

Additional Information:
Source Context                system_u:system_r:syslogd_t:s0
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                /var/log/journal/5a755c5e9a2346f5b8c38951388af976/
                              user-1000.journal [ file ]
Source                        systemd-journal
Source Path                   systemd-journal
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-260.8.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.12.9-300.fc26.x86_64 #1 SMP Fri
                              Aug 25 13:09:43 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-09-11 11:18:49 CEST
Last Seen                     2017-09-11 11:18:49 CEST
Local ID                      f1a25262-3fb9-4d33-a108-3d2d38da1203

Raw Audit Messages
type=AVC msg=audit(1505121529.655:706): avc:  denied  { setattr } for  pid=776 comm="systemd-journal" name="user-1000.journal" dev="dm-1" ino=934493 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0


Hash: systemd-journal,syslogd_t,unlabeled_t,file,setattr

Version-Release number of selected component:
selinux-policy-3.13.1-260.8.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.9-300.fc26.x86_64
type:           libreport

Comment 1 Ulrik Dickow 2018-02-09 16:51:00 UTC
This is a duplicate of bug 1447750.

Comment 2 Daniel Walsh 2018-02-24 15:55:45 UTC

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