Bug 1016664 - SELinux is preventing /usr/libexec/gdm-session-worker from 'read' accesses on the file.
SELinux is preventing /usr/libexec/gdm-session-worker from 'read' accesses on...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-08 09:40 EDT by Artemio
Modified: 2013-10-22 01:04 EDT (History)
4 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-74.10.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-22 01:04:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Artemio 2013-10-08 09:40:42 EDT
Description of problem:
SELinux is preventing /usr/libexec/gdm-session-worker from 'read' accesses on the file nologin.

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

If você acredita que o gdm-session-worker deva ser permitido acesso de read em nologin file  por default.
Then você precisa reportar este como um erro.
Você pode gerar um módulo de política local para permitir este acesso.
permitir este acesso agora executando:
# 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                          <Desconhecido>
Host                          (removed)
Source RPM Packages           gdm-3.8.4-2.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.4.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.1-200.fc19.x86_64 #1 SMP Sat
                              Sep 14 15:04:51 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-10-07 12:15:29 BRT
Last Seen                     2013-10-07 12:15:29 BRT
Local ID                      d0438abb-2ad2-4d21-8304-38bd5feaec16

Raw Audit Messages
type=AVC msg=audit(1381158929.199:208): avc:  denied  { read } for  pid=10381 comm="gdm-session-wor" name="nologin" dev="tmpfs" ino=252292 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(1381158929.199:208): arch=x86_64 syscall=open success=no exit=EACCES a0=7fe980ebed26 a1=0 a2=0 a3=6 items=0 ppid=1423 pid=10381 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 fsgid=1000 ses=1 tty=(none) 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

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.1-200.fc19.x86_64
type:           libreport

Potential duplicate: bug 819347
Comment 1 Daniel Walsh 2013-10-09 09:43:12 EDT
matchpathcon /run/nologin
/run/nologin	system_u:object_r:systemd_logind_var_run_t:s0

Looks like a labeling issue.

Any idea which app created the file?
Comment 2 Daniel Walsh 2013-10-09 09:45:33 EDT

sesearch -T | grep nologin | grep var_run
type_transition unconfined_t var_run_t : file systemd_logind_var_run_t "nologin"; 
type_transition init_t var_run_t : file systemd_logind_var_run_t "nologin"; 
type_transition rpm_script_t var_run_t : file systemd_logind_var_run_t "nologin"

We have these rules to create the content with the correct label.

Are you running acpupsd?
Comment 3 Daniel Walsh 2013-10-09 09:51:09 EDT
bd6ae11e62a6e2344da7a61e7aef732ac5589f19 in git will make sure if systemd_logind creates the file with the correct label.
Comment 4 Lukas Vrabec 2013-10-09 10:20:53 EDT
back ported.
Comment 5 Fedora Update System 2013-10-15 12:02:51 EDT
selinux-policy-3.12.1-74.10.fc19 has been submitted as an update for Fedora 19.
Comment 6 Fedora Update System 2013-10-18 16:02:32 EDT
Package selinux-policy-3.12.1-74.10.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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-74.10.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2013-10-22 01:04:55 EDT
selinux-policy-3.12.1-74.10.fc19 has been pushed to the Fedora 19 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.