Hi!

In debian bug #250817, Charles C. Fu claims:

authldaplib.c has an error in the placement of a parenthesis following
calls to ldap_search_st, which causes ldaperror to be passed the result
of a comparison instead of an error code, which often causes authdaemond
to terminate processing of the authmodulelist (from authdaemonrc)
instead of trying the next auth module.

The bug report is at:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250817

I have attached a patch against cvs. Note that I didn't try to compile with this patch, I just forward-ported what was in the original patch, which seems obvious to me.

Willi
Index: authldaplib.c
===================================================================
RCS file: /cvsroot/courier/libs/authlib/authldaplib.c,v
retrieving revision 1.52
diff -u -r1.52 authldaplib.c
--- authldaplib.c	10 Jul 2005 00:47:36 -0000	1.52
+++ authldaplib.c	18 Sep 2005 10:17:10 -0000
@@ -997,8 +997,8 @@
 					      :my_ldap.basedn),
 				     LDAP_SCOPE_SUBTREE,
 				     srch, (char **)attributes, 0,
-				     &tv, &result)
-		      != LDAP_SUCCESS))
+				     &tv, &result))
+		      != LDAP_SUCCESS)
 	{
 		free(srch);
 
@@ -1152,8 +1152,8 @@
 	if (ldaperror(ldap_search_st(my_ldap_fp,
 				     (char *)my_ldap.basedn,LDAP_SCOPE_SUBTREE,
 				     filter, (char **)my_ldap.attrlist, 0,
-				     &timeout, &result)
-		      != LDAP_SUCCESS))
+				     &timeout, &result))
+		      != LDAP_SUCCESS)
 	{
 		DPRINTF("ldap_search_st() failed");
 		free(filter);

Reply via email to