Bug 819347 - SELinux is preventing /usr/libexec/gdm-session-worker from 'read' accesses on the file nologin.
Summary: SELinux is preventing /usr/libexec/gdm-session-worker from 'read' accesses on...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e964ac6fc5b540dadb74e01ce36...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-06 19:12 UTC by troilimathieu
Modified: 2012-05-28 01:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-28 01:19:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description troilimathieu 2012-05-06 19:12:02 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.3.4-4.fc17.x86_64
time:           dim. 06 mai 2012 21:12:34 CEST

description:
:SELinux is preventing /usr/libexec/gdm-session-worker from 'read' accesses on the file nologin.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that gdm-session-worker should be allowed read access on the nologin 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 gdm-session-wor /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:init_var_run_t:s0
:Target Objects                nologin [ file ]
:Source                        gdm-session-wor
:Source Path                   /usr/libexec/gdm-session-worker
:Port                          <Inconnu>
:Host                          (removed)
:Source RPM Packages           gdm-3.4.1-1.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-121.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.4-4.fc17.x86_64 #1 SMP Fri
:                              May 4 17:25:07 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    dim. 06 mai 2012 19:43:22 CEST
:Last Seen                     dim. 06 mai 2012 19:43:22 CEST
:Local ID                      39f4e920-562b-42d9-adf5-3c51be29fd67
:
:Raw Audit Messages
:type=AVC msg=audit(1336326202.712:343): avc:  denied  { read } for  pid=13122 comm="gdm-session-wor" name="nologin" dev="tmpfs" ino=496260 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_run_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1336326202.712:343): arch=x86_64 syscall=open success=no exit=EACCES a0=7f12fd2d6d22 a1=0 a2=0 a3=0 items=0 ppid=13103 pid=13122 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=gdm-session-wor exe=/usr/libexec/gdm-session-worker subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)
:
:Hash: gdm-session-wor,xdm_t,init_var_run_t,file,read
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Miroslav Grepl 2012-05-07 12:58:10 UTC
If you execute

# restorecon -R -v /etc/nologin

Are you able to reproduce it again?

Comment 2 Daniel Walsh 2012-05-07 14:42:03 UTC
Is there a new nologin file being created by systemd?

Comment 3 Michal Schmidt 2012-05-07 20:00:06 UTC
pam_nologin.so prefers /var/run/nologin since:

2010-08-26 Tomas Mraz <t8m@…>

    modules/pam_nologin/pam_nologin.c (perform_check): Try first /var/run/nologin if the nologin file is not explicitly specified.
    modules/pam_nologin/pam_nologin.8.xml: Document that /var/run/nologin is tried first. 


/var/run is a symlink to /run.

The "systemd-user-sessions" helper program creates /run/nologin when systemd-user-sessions.service is stopping.
The "systemd-shutdownd" daemon creates /run/nologin at 5 minutes before a scheduled shutdown.

Comment 4 Daniel Walsh 2012-05-07 20:37:25 UTC
Ok I guess we can label this systemd_login_var_run_t.  Does apcupsd use this path now?

Comment 5 Daniel Walsh 2012-05-07 20:41:59 UTC
Fixed in selinux-policy-3.10.0-123.fc17

Comment 6 Fedora Update System 2012-05-09 15:17:25 UTC
selinux-policy-3.10.0-124.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-124.fc17

Comment 7 Fedora Update System 2012-05-17 22:57:30 UTC
Package selinux-policy-3.10.0-125.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-125.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-7953/selinux-policy-3.10.0-125.fc17
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-05-28 01:19:54 UTC
selinux-policy-3.10.0-125.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


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