Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2008 13:50:23 GMT
From:      Szymon Roczniak <simon@dischaos.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/120883: [patch] net-im/jabberd: add cyrus-sasl2 support
Message-ID:  <200802201350.m1KDoNr8095461@www.freebsd.org>
Resent-Message-ID: <200802201400.m1KE06Zb023235@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         120883
>Category:       ports
>Synopsis:       [patch] net-im/jabberd: add cyrus-sasl2 support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 20 14:00:06 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Szymon Roczniak
>Release:        6.3-RELEASE i386
>Organization:
>Environment:
>Description:
jabberd and gsasl installed from ports and up to date

SASL authentication stopped working after moving to a fresh installation of jabberd on a new server.

This might be limited to my installation or some weirdness in my configuration. However, I've also tried it with default config files with the same result - SASL authentication not working.

Quick google search revealed that the problem might be in the GSASL library. Fortunately jabberd also supports cyrus-sasl, and compiling it against this sasl library instead of gsasl actually fixes the problem.


>How-To-Repeat:
Install net-im/jabberd, do basic configuration and start it. Try connecting with any jabber client with SASL authentication enabled. It shouldn't let you log on.
>Fix:
the attached patch adds a 'CYRUS sasl' option to the ports' configuration. 

Patch attached with submission follows:

diff -uNr jabberd.orig/Makefile jabberd/Makefile
--- jabberd.orig/Makefile	Mon Jan 14 14:21:50 2008
+++ jabberd/Makefile	Wed Feb 20 13:00:40 2008
@@ -15,7 +15,6 @@
 COMMENT=	Online presence and instant messaging server
 
 LIB_DEPENDS=	expat.6:${PORTSDIR}/textproc/expat2 \
-		gsasl.11:${PORTSDIR}/security/gsasl \
 		idn.16:${PORTSDIR}/dns/libidn
 
 OPTIONS=	MYSQL "Support MySQL (storage/auth/reg)" on \
@@ -28,7 +27,8 @@
 		ANON "Enable anonymous (auth/reg)" off \
 		FS "Filesystem storage (only for testing)" off \
 		DEBUG "Compile with debug messages" on \
-		REQUIRES "Add backend requires to startup script" off
+		REQUIRES "Add backend requires to startup script" off \
+		CYRUS "Use cyrus SASL instead of gsasl (experimental)" off 
 
 GNU_CONFIGURE=	yes
 USE_OPENSSL=	yes
@@ -69,6 +69,14 @@
 
 .if !defined(WITHOUT_DEBUG)
 CONFIGURE_ARGS+=--enable-debug
+.endif
+
+.if defined(WITH_CYRUS)
+CONFIGURE_ARGS+=--enable-sasl=cyrus
+LIB_DEPENDS+=	sasl2.2:${PORTSDIR}/security/cyrus-sasl2 
+.else
+CONFIGURE_ARGS+=--enable-sasl=gsasl
+LIB_DEPENDS+=	gsasl.11:${PORTSDIR}/security/gsasl 
 .endif
 
 .if defined(WITH_POSTGRESQL)
diff -uNr jabberd.orig/files/patch-sx-sasl_cyrus.c jabberd/files/patch-sx-sasl_cyrus.c
--- jabberd.orig/files/patch-sx-sasl_cyrus.c	Thu Jan  1 00:00:00 1970
+++ jabberd/files/patch-sx-sasl_cyrus.c	Wed Feb 20 13:05:12 2008
@@ -0,0 +1,10 @@
+--- sx/sasl_cyrus.c.orig   2008-02-19 22:13:53.000000000 +0000
++++ sx/sasl_cyrus.c        2008-02-19 22:14:05.000000000 +0000
+@@ -20,7 +20,6 @@
+
+ /* SASL authentication handler */
+
+-#error Cyrus SASL implementation is not supported! It is included here only for the brave ones, that do know what they are doing. You need to remove this line to compile it.
+
+ #include "sx.h"
+ #include "sasl.h"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802201350.m1KDoNr8095461>