Courier-LDAP build is linked against worong ldap library version

Bug #1730289 reported by Aleksey Sanin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
courier (Ubuntu)
New
Undecided
Unassigned

Bug Description

The courier-ldap authentication has intermittent connectivity problems. I've traced this to the following code in the courier-ldap module:

https://github.com/svarshavchik/courier/blob/master/courier-authlib/authldaplib.cpp#L142

This code intentionally disables the connection attempt for 60 secs after the first failure due to an old memory leak in LDAP library. I've recently installed Ubuntu 17.10 which contains libldap-2.4-2. According to the courier-imap code it should have been fixed in ldap library 20019. The LDAP library on 17.10 has the following defines:

$ grep -r LDAP_VENDOR_ /usr/include/*
/usr/include/ldap_features.h:#define LDAP_VENDOR_VERSION 20445
/usr/include/ldap.h:#define LDAP_VENDOR_NAME "OpenLDAP"

Which should ensure that the 60 sec delay is disabled by default. However, I can clearly see it is happening on my install. The only explanation is that Couirer-LDAP package was compiled against different header files.

P.S. The bug goes away if I manually set env variable LDAP_MEMORY_LEAK=0 -- in this case I can see occasional connection failures followed immediately by a successful connection (as expected).

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: courier-ldap (not installed)
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic i686
ApportVersion: 2.20.7-0ubuntu3.1
Architecture: i386
Date: Sun Nov 5 22:37:15 2017
InstallationDate: Installed on 2011-02-21 (2449 days ago)
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release i386 (20100427)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: courier
UpgradeStatus: Upgraded to artful on 2017-11-05 (0 days ago)

Revision history for this message
Aleksey Sanin (aleksey-l) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.