Bug 678159

Summary: SELinux is preventing /usr/bin/pulseaudio from 'connectto' accesses on the unix_stream_socket /tmp/.esd-500/socket.
Product: [Fedora] Fedora Reporter: Jóhann B. Guðmundsson <johannbg>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:60c08c06c8993f97495338b7e0c8d4dd8bcb4f2e6edf818a162b763312b3e3b8
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-18 12:58:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jóhann B. Guðmundsson 2011-02-16 22:45:06 UTC
SELinux is preventing /usr/bin/pulseaudio from 'connectto' accesses on the unix_stream_socket /tmp/.esd-500/socket.

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

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

Additional Information:
Source Context                unconfined_u:unconfined_r:pulseaudio_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                /tmp/.esd-500/socket [ unix_stream_socket ]
Source                        pulseaudio
Source Path                   /usr/bin/pulseaudio
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           pulseaudio-0.9.22-3.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.14-2.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.38-0.rc5.git0.1.fc15.x86_64 #1 SMP Wed Feb 16
                              05:15:25 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 16 Feb 2011 10:14:20 PM GMT
Last Seen                     Wed 16 Feb 2011 10:14:20 PM GMT
Local ID                      4982beaa-1fa5-4258-94fd-d63beb2fc685

Raw Audit Messages
type=AVC msg=audit(1297894460.156:539): avc:  denied  { connectto } for  pid=5036 comm="pulseaudio" path="/tmp/.esd-500/socket" scontext=unconfined_u:unconfined_r:pulseaudio_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket


type=SYSCALL msg=audit(1297894460.156:539): arch=x86_64 syscall=connect success=no exit=EACCES a0=1e a1=7fff3664e840 a2=6e a3=10 items=0 ppid=5034 pid=5036 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm=pulseaudio exe=/usr/bin/pulseaudio subj=unconfined_u:unconfined_r:pulseaudio_t:s0-s0:c0.c1023 key=(null)

Hash: pulseaudio,pulseaudio_t,unconfined_t,unix_stream_socket,connectto

audit2allow

#============= pulseaudio_t ==============
allow pulseaudio_t unconfined_t:unix_stream_socket connectto;

audit2allow -R

#============= pulseaudio_t ==============
allow pulseaudio_t unconfined_t:unix_stream_socket connectto;

Comment 1 Jóhann B. Guðmundsson 2011-02-16 22:48:43 UTC
Note this happened when Gnome-Shell crashed and restarted GDM. It was present after I had logged in and this is after I ran fixfiles...

Comment 2 Miroslav Grepl 2011-02-17 10:12:26 UTC
Well, it is definitely caused by the crash. What is your output of

# ps -eZ | grep pulseaudio

Comment 3 Jóhann B. Guðmundsson 2011-02-17 22:49:16 UTC
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 9111 ? 00:10:21 pulseaudio

Comment 4 Miroslav Grepl 2011-02-18 12:58:15 UTC
Ok, so pulseaudio ended up in the wrong domain after the crash. You can allow it using

# grep pulseaudio /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

The problem will go away after next boot.