Bug 978905

Summary: SELinux is preventing /usr/bin/systemctl from 'connectto' accesses on the unix_stream_socket /run/systemd/private.
Product: [Fedora] Fedora Reporter: Michal Nowak <mnowak>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:34896ac08727cf1b47a7343a1e4f5adbcb3f1a204f3cadee6da22c9f2f8758c9
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-27 20:02:04 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 Michal Nowak 2013-06-27 09:53:01 UTC
Description of problem:
SELinux is preventing /usr/bin/systemctl from 'connectto' accesses on the unix_stream_socket /run/systemd/private.

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

If you believe that systemctl should be allowed connectto access on the private unix_stream_socket 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 shutdown /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:apmd_t:s0
Target Context                system_u:system_r:init_t:s0
Target Objects                /run/systemd/private [ unix_stream_socket ]
Source                        shutdown
Source Path                   /usr/bin/systemctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-204-8.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-54.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-301.fc19.x86_64 #1 SMP Mon
                              Jun 17 14:26:26 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-06-26 23:11:02 CEST
Last Seen                     2013-06-26 23:11:02 CEST
Local ID                      b4c3e0a8-4dfd-4cea-8fe3-ac6e1e8751be

Raw Audit Messages
type=AVC msg=audit(1372281062.668:737): avc:  denied  { connectto } for  pid=18224 comm="shutdown" path="/run/systemd/private" scontext=system_u:system_r:apmd_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=unix_stream_socket


type=SYSCALL msg=audit(1372281062.668:737): arch=x86_64 syscall=connect success=no exit=EACCES a0=3 a1=7fff88837f70 a2=16 a3=7fff88837d20 items=0 ppid=18209 pid=18224 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=shutdown exe=/usr/bin/systemctl subj=system_u:system_r:apmd_t:s0 key=(null)

Hash: shutdown,apmd_t,init_t,unix_stream_socket,connectto

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.6-301.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-06-27 20:01:23 UTC
491e17b17a0090c311d1a44ab9cc752023671fe0 fixes this in git.

Comment 2 Daniel Walsh 2013-06-27 20:02:04 UTC

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