Bug 437879

Summary: SELinux policy breaks rythmbox daap music browsing
Product: [Fedora] Fedora Reporter: Eric Mertens <emertens>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: rvokal, tiagomatos
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-17 22:03:20 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 Eric Mertens 2008-03-17 20:52:24 UTC
Description of problem:
The SELinux policy prevents Rhythmbox from communicating with avahi-daemon,
breaking DAAP music sharing.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.0.8-93.fc8

How reproducible:


Steps to Reproduce:
1. Open rhythmbox in console
2. Read error messages.
3.
  
Actual results:
(rhythmbox:3172): Rhythmbox-WARNING **: Failed to invoke RequestName: Connection
":1.22" is not allowed to own the service "org.gnome.Rhythmbox" due to SELinux
policy

(rhythmbox:3172): Rhythmbox-WARNING **: Got unhandled reply 53 from RequestName

(rhythmbox:3172): Rhythmbox-WARNING **: Unable to start mDNS browsing: MDNS
service is not running

(rhythmbox:3172): Rhythmbox-WARNING **: Unable to notify network of music
sharing: The avahi MDNS service is not running



Expected results:


Additional info:

Comment 1 Daniel Walsh 2008-03-17 21:32:59 UTC
Are you seeing avc in /var/log/audit/audit.log?

Comment 2 Eric Mertens 2008-03-17 21:43:55 UTC
I'm not quite certain how to answer your question as I don't know much about the
workings of SELinux, but I think that this might be the relevant portion of the
SELinux audit.log

type=USER_AVC msg=audit(1205787612.852:61): user pid=2022 uid=81 auid=4294967295
subj=system_u:system_r:system_dbusd_t:s0 msg='avc:  denied  { send_msg } for
msgtype=method_call interface=org.freedesktop.Avahi.Server member=GetAPIVersion
dest=org.freedesktop.Avahi spid=3654 tpid=2338
scontext=unconfined_u:system_r:unconfined_execmem_t:s0-s0:c0.c1023
tcontext=system_u:system_r:avahi_t:s0 tclass=dbus : exe="/bin/dbus-daemon"
(sauid=81, hostname=?, addr=?, terminal=?)'
type=USER_AVC msg=audit(1205787612.853:62): user pid=2022 uid=81 auid=4294967295
subj=system_u:system_r:system_dbusd_t:s0 msg='avc:  denied  { send_msg } for
msgtype=method_return dest=:1.50 spid=2338 tpid=3654
scontext=system_u:system_r:avahi_t:s0
tcontext=unconfined_u:system_r:unconfined_execmem_t:s0-s0:c0.c1023 tclass=dbus :
exe="/bin/dbus-daemon" (sauid=81, hostname=?, addr=?, terminal=?)'


Comment 3 Daniel Walsh 2008-03-18 13:04:09 UTC
You can allow this for now by executing 

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

Fixed in selinux-policy-3.0.8-95.fc8

Comment 4 Eric Mertens 2008-03-18 18:46:23 UTC
Hello, after using the fix you posted I was able to browse DAAP shares and
publish my own again via avahi.

However, I did get this warning message that I wanted to share in case it is
related:

$ rhythmbox

(rhythmbox:8763): Rhythmbox-WARNING **: Failed to invoke RequestName: Connection
":1.29" is not allowed to own the service "org.gnome.Rhythmbox" due to SELinux
policy

(rhythmbox:8763): Rhythmbox-WARNING **: Got unhandled reply 53 from RequestName


Comment 5 Daniel Walsh 2008-03-18 18:59:48 UTC
Looks like some avc is missing.  Could you see if you got another


Comment 6 Josef Kubin 2008-03-19 01:20:25 UTC
# setenforce 1; setenforce 0
# cat /dev/null > /var/log/audit/audit.log
$ rhythmbox
Play with rhythmbox for a while and if you will see an avc, attach your
audit.log please.


Comment 7 Eric Mertens 2008-03-19 20:15:57 UTC
I haven't seen any more audit.log entries relating to rhythmbox since restarting
and running in permissive mode.

Comment 8 Daniel Walsh 2008-03-19 20:26:01 UTC
So you are not seeing this message at all

(rhythmbox:8763): Rhythmbox-WARNING **: Failed to invoke RequestName: Connection
":1.29" is not allowed to own the service "org.gnome.Rhythmbox" due to SELinux
policy

Or you are not seeing it in permissive mode, but are seeing it in enforcing mode?

Comment 9 Eric Mertens 2008-03-19 22:56:09 UTC
I only see it in enforcing mode, and there is not a corresponding entry in my
audit.log

Comment 10 Daniel Walsh 2008-03-20 13:28:58 UTC
Ok, try to turn off dontaudit rules

# semodule -DB
Run Test
# semodule -B
Check for AVC Messages.

Comment 11 Eric Mertens 2008-05-30 22:36:39 UTC
I'm using Fedora Core 9 now and I don't get any SELinux related errors when
using rhythmbox. I think this bug can likely be closed.

Comment 12 Daniel Walsh 2008-11-17 22:03:20 UTC
Closing all bugs that have been in modified for over a month.  Please reopen if the bug is not actually fixed.