[exim-dev] [Bug 139] Dynamically loadable lookup modules

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: exim-dev
Subject: [exim-dev] [Bug 139] Dynamically loadable lookup modules
------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=139




--- Comment #42 from Phil Pennock <pdp@???> 2011-01-17 14:00:01 ---
This now works in FreeBSD too. The problem, besides a buglet introduced in the
previous commit, was an assumption in the code that dlerror() called after
dlsym() can only return an error if dlsym() fails.

dlerror() returns the last error. There may have been outstanding errors
before the call to dlsym(), so this would cause a spurious failure.

On FreeBSD, the nscd integration happens by placing a "cache" source into
/etc/nsswitch.conf; the libc resolution dispatch [nsdispatch()] tests for the
existence of a dummy function in the symbol table of the current process.
nscd(8) contains that dummy function, and so the "cache" source is skipped and
the next source is tried. See
/usr/src/usr.sbin/nscd/nscd.c:_nss_cache_cycle_prevention_function() and the
comments for more details.

So, clearing out dlerror() before the call to dlsym() means that I can now use
sqlite3 as a module on FreeBSD. We're up to two platforms!

Can a Linux user who depends upon this functionality please test current git
and make sure things are operational for you?

Thanks,
-Phil


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email