Bug 1301829

Summary: systemd-logind is unable to access /dev/shm/PostgreSQL due to unable to read tmpfs by selinux
Product: Red Hat Enterprise Linux 7 Reporter: Mohit Agrawal <moagrawa>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde
Target Milestone: rc   
Target Release: 7.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-25 11:44:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mohit Agrawal 2016-01-26 05:07:43 UTC
Description of problem:
systemd-logind is unable to access /dev/shm/PostgreSQL due to unable to read tmpfs by selinux,It is showing below error

systemd-logind: Failed to stat() POSIX shared memory segment PostgreSQL.1804289383: Permission denied
And in /var/log/audit/audit.log:
type=AVC msg=audit(1453450858.765:5271): avc:  denied  { getattr } for  pid=697 comm="systemd-logind" path="/dev/shm/PostgreSQL.1804289383" dev="tmpfs" ino=18249 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:initrc_state_t:s0 tclass=file

Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux 7.2
How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:
systemd-logind is unable to stat POSIX memory segment getting permission denied

Expected results:
It should not get any error.

Additional info:

Comment 4 Mohit Agrawal 2016-01-26 10:00:15 UTC
Hi,

Issue will fix from https://bugzilla.redhat.com/show_bug.cgi?id=1284588 in systemd-logind and workaround is set RemoveIPC=no in /etc/systemd/logind.conf.

Now you can close this bug.

Regards
Mohit Agrawal

Comment 5 Lukas Vrabec 2016-04-25 11:44:56 UTC
Regarding to comment 4, closing this issue as NOTABUG