我有一个在 Fedora 20 机器上运行的服务,它在启动时尝试向 Avahi 注册服务。如果我的服务在 SELinux 处于许可模式时启动,这将非常有效,但在 SELinux 强制执行时该服务不会注册。
我知道httpd_dbus_avahi
SELinux中的布尔值。这非常适用于允许 Apache 注册服务,但我一直无法找到有关如何允许其他特定服务与 Avahi 通信的大量信息。
更具体地说,我试图允许 tvheadend 向 Avahi 注册其 HTSP 服务,但我也很好奇如何允许任何特定服务与 Avahi 通信而不会被 SELinux 停止。我对关闭 SELinux 或允许想要与 Avahi 通信的进程不感兴趣。
编辑:添加了与 tvheadend 相关的所有 SELinux 和服务单元信息
---SELinux---
审计日志消息
执行semodule -DB
并重新启动 tvheadend 服务后。以下是审计日志中出现的所有消息。最后一条消息似乎是问题所在,但我不知道该怎么做...
type=SERVICE_STOP msg=audit(1393282994.012:512): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="tvheadend" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=SERVICE_START msg=audit(1393283083.635:513): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="tvheadend" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=USER_AVC msg=audit(1393283084.291:514): pid=752 uid=81 auid=4294967295 ses=4294967295 …
Run Code Online (Sandbox Code Playgroud)