Package: libldap2
Version: 2.1.30-13+b1

SASL authentication does not work with libldap 2.1 if $LDAPNOINIT is
set.

The bug is fixed in upstream libldap 2.2.  Patch below.

Note that this bug does not affect the OpenLDAP command line tools
included with Debian (package ldap-utils), since these are up-to-date,
only the out-of-date library (package libldap2) and applications using
it have this problem.

To reproduce, compile the tools with ldapldap 2.1 and run:

$ LDAPNOINIT=true /opt/openldap21/bin/ldapsearch -h ldap.openldap.org
ldap_sasl_interactive_bind_s: Local error (82)

Correct output is:

$ /opt/openldap21/bin/ldapsearch -h ldap.openldap.org
SASL/DIGEST-MD5 authentication started
Please enter your password:
[...]

I am submitting this bug since the upcoming new version of ldapvi will
both support SASL and also have its own configuration file format, and
hence needs to be able to suppress parsing of libldap configuration
files and is affected by this problem.  Not a critical bug, but if and
when ldapvi 1.6 is released and eventually included in Debian, it would
be nice if libldap could either be upgraded or fixed using the following
patch from upstream OpenLDAP:


Index: libraries/libldap/cyrus.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/cyrus.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- libraries/libldap/cyrus.c   26 Nov 2003 06:16:36 -0000      1.96
+++ libraries/libldap/cyrus.c   3 Dec 2003 00:59:33 -0000       1.97
@@ -1,4 +1,4 @@
-/* $OpenLDAP: pkg/ldap/libraries/libldap/cyrus.c,v 1.96 2003/11/26 06:16:36 
kurt Exp $ */
+/* $OpenLDAP: pkg/ldap/libraries/libldap/cyrus.c,v 1.97 2003/12/03 00:59:33 
hyc Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
  * Copyright 1998-2003 The OpenLDAP Foundation.
@@ -499,6 +499,11 @@
                return ld->ld_errno;
        }
 
+       if ( ldap_int_sasl_init() ) {
+               ld->ld_errno = LDAP_LOCAL_ERROR;
+               return ld->ld_errno;
+       }
+
 #if SASL_VERSION_MAJOR >= 2
        rc = sasl_client_new( "ldap", host, NULL, NULL,
                NULL, 0, &ctx );
Index: libraries/libldap/init.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/init.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- libraries/libldap/init.c    26 Nov 2003 06:16:36 -0000      1.85
+++ libraries/libldap/init.c    3 Dec 2003 00:59:33 -0000       1.86
@@ -1,4 +1,4 @@
-/* $OpenLDAP: pkg/ldap/libraries/libldap/init.c,v 1.85 2003/11/26 06:16:36 
kurt Exp $ */
+/* $OpenLDAP: pkg/ldap/libraries/libldap/init.c,v 1.86 2003/12/03 00:59:33 hyc 
Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
  * Copyright 1998-2003 The OpenLDAP Foundation.
@@ -611,6 +611,4 @@
        }
 
        openldap_ldap_init_w_env(gopts, NULL);
-
-       ldap_int_sasl_init();
 }


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to