Bug 724844 - SELinux is preventing systemd-logind from 'getattr' accesses on the file /proc/<pid>/sessionid.
Summary: SELinux is preventing systemd-logind from 'getattr' accesses on the file /pro...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:6367ab88727...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-22 00:50 UTC by Jens Petersen
Modified: 2011-07-22 20:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-22 20:39:48 UTC
Type: ---


Attachments (Terms of Use)

Description Jens Petersen 2011-07-22 00:50:24 UTC
SELinux is preventing systemd-logind from 'getattr' accesses on the file /proc/<pid>/sessionid.

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

If you believe that systemd-logind should be allowed getattr access on the sessionid 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:
# grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                /proc/<pid>/sessionid [ file ]
Source                        systemd-logind
Source Path                   systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-6.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              3.0-0.rc7.git3.1.fc16.x86_64 #1 SMP Fri Jul 15
                              22:56:12 UTC 2011 x86_64 x86_64
Alert Count                   4
First Seen                    Thu 21 Jul 2011 05:54:48 PM JST
Last Seen                     Fri 22 Jul 2011 09:48:11 AM JST
Local ID                      842c70c0-e006-4c60-bfb1-80a360fe5d1c

Raw Audit Messages
type=AVC msg=audit(1311295691.632:228): avc:  denied  { getattr } for  pid=721 comm="systemd-logind" path="/proc/11363/sessionid" dev=proc ino=40923 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=file


Hash: systemd-logind,systemd_logind_t,unconfined_t,file,getattr

audit2allow

#============= systemd_logind_t ==============
allow systemd_logind_t unconfined_t:file getattr;

audit2allow -R

#============= systemd_logind_t ==============
allow systemd_logind_t unconfined_t:file getattr;

Comment 1 Jens Petersen 2011-07-22 00:52:08 UTC
Above happens when running su in current Rawhide.

Comment 2 Miroslav Grepl 2011-07-22 10:22:15 UTC
Fixed in the next Rawhide release.

Comment 3 Miroslav Grepl 2011-07-22 16:39:32 UTC
Actually I also see

#============= systemd_logind_t ==============
allow systemd_logind_t unconfined_t:dbus send_msg;

Comment 4 Daniel Walsh 2011-07-22 20:39:48 UTC
Fixed in selinux-policy-3.10.0-9.fc16


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