Bug 1321049 - Prosody SELinux policy (saslauthd)
Summary: Prosody SELinux policy (saslauthd)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-24 14:35 UTC by Etienne CHAMPETIER
Modified: 2016-11-04 02:45 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-69.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 02:45:43 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2283 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2016-11-03 13:36:25 UTC

Description Etienne CHAMPETIER 2016-03-24 14:35:34 UTC
Hi,

default prosody selinux policy break cyrus sasl auth
i'm using saslauthd to bind to openldap

# install
yum install prosody lua-cyrussasl cyrus-sasl-plain cyrus-sasl

# use cyrus authentication in prosody conf
VirtualHost "my.dom"
        authentication = "cyrus"


# and you get this in audit.log
#######################################################################################
type=AVC msg=audit(1458828007.309:1551): avc:  denied  { connectto } for  pid=10304 comm="lua" path="/run/saslauthd/mux" scontext=system_u:system_r:prosody_t:s0 tcontext=system_u:system_r:saslauthd_t:s0 tclass=unix_stream_socket
type=SYSCALL msg=audit(1458828007.309:1551): arch=c000003e syscall=42 success=yes exit=0 a0=12 a1=7ffe8362a510 a2=6e a3=1fde items=0 ppid=1 pid=10304 auid=4294967295 uid=991 gid=988 euid=991 suid=991 fsuid=991 egid=988 sgid=988 fsgid=988 tty=(none) ses=4294967295 comm="lua" exe="/usr/bin/lua" subj=system_u:system_r:prosody_t:s0 key=(null)
type=AVC msg=audit(1458828061.707:1560): avc:  denied  { write } for  pid=10304 comm="lua" name="mux" dev="tmpfs" ino=6057442 scontext=system_u:system_r:prosody_t:s0 tcontext=system_u:object_r:saslauthd_var_run_t:s0 tclass=sock_file
type=SYSCALL msg=audit(1458828061.707:1560): arch=c000003e syscall=42 success=yes exit=0 a0=13 a1=7ffe8362a510 a2=6e a3=1fd1 items=0 ppid=1 pid=10304 auid=4294967295 uid=991 gid=988 euid=991 suid=991 fsuid=991 egid=988 sgid=988 fsgid=988 tty=(none) ses=4294967295 comm="lua" exe="/usr/bin/lua" subj=system_u:system_r:prosody_t:s0 key=(null)
#######################################################################################

# here the output of audit.log
#######################################################################################
module prosody_saslauthd 1.0;

require {
	type saslauthd_var_run_t;
	type prosody_t;
	type saslauthd_t;
	class sock_file write;
	class unix_stream_socket connectto;
}

#============= prosody_t ==============

#!!!! This avc can be allowed using the boolean 'daemons_enable_cluster_mode'
allow prosody_t saslauthd_t:unix_stream_socket connectto;
allow prosody_t saslauthd_var_run_t:sock_file write;
#######################################################################################

using
selinux-policy/selinux-policy-targeted 3.13.1-60.el7_2.3
prosody 0.9.10-1.el7

Comment 2 Lukas Vrabec 2016-03-31 15:14:56 UTC
commit 860d4893b898699ffe9b9ffdaa9d3c2132be6a41
Author: Lukas Vrabec <lvrabec>
Date:   Thu Mar 31 17:12:43 2016 +0200

    Allow prosody to stream connect to sasl. This will allow using cyrus authentication in prosody.
    Resolves: rhbz#1321049

Comment 6 errata-xmlrpc 2016-11-04 02:45:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2283.html


Note You need to log in before you can comment on or make changes to this bug.