1 diff --git a/CHANGELOG b/CHANGELOG
2 index c208b31..a2a782d 100644
6 - check for "*" when looking up wildcard in LDAP.
7 - fix LDAP schema discovery.
8 - add SEARCH_BASE configuration option.
9 +- work around segv at exit due to libxml2 tsd usage.
11 18/06/2007 autofs-5.0.2
12 -----------------------
13 diff --git a/aclocal.m4 b/aclocal.m4
14 index d0d8346..ffeb232 100644
17 @@ -167,6 +167,19 @@ else
19 XML_LIBS=`$XML_CONFIG --libs`
20 XML_FLAGS=`$XML_CONFIG --cflags`
21 + XML_VER=`$XML_CONFIG --version`
22 + XML_MAJOR=`echo $XML_VER|cut -d\. -f1`
23 + if test $XML_MAJOR -le 2
25 + XML_MINOR=`echo $XML_VER|cut -d\. -f2`
26 + if test $XML_MINOR -le 6
28 + XML_REV=`echo $XML_VER|cut -d\. -f3`
29 + if test $XML_REV -le 99; then
30 + AC_DEFINE(LIBXML2_WORKAROUND,1, [Use libxml2 tsd usage workaround])
36 dnl --------------------------------------------------------------------------
37 diff --git a/configure b/configure
38 index b723d74..3508224 100755
41 @@ -2498,6 +2498,23 @@ echo "${ECHO_T}yes" >&6; }
43 XML_LIBS=`$XML_CONFIG --libs`
44 XML_FLAGS=`$XML_CONFIG --cflags`
45 + XML_VER=`$XML_CONFIG --version`
46 + XML_MAJOR=`echo $XML_VER|cut -d\. -f1`
47 + if test $XML_MAJOR -le 2
49 + XML_MINOR=`echo $XML_VER|cut -d\. -f2`
50 + if test $XML_MINOR -le 6
52 + XML_REV=`echo $XML_VER|cut -d\. -f3`
53 + if test $XML_REV -le 99; then
55 +cat >>confdefs.h <<\_ACEOF
56 +#define LIBXML2_WORKAROUND 1
65 diff --git a/daemon/automount.c b/daemon/automount.c
66 index 4b6584a..aeeb7cb 100644
67 --- a/daemon/automount.c
68 +++ b/daemon/automount.c
70 #include <sys/utsname.h>
72 #include "automount.h"
73 +#ifdef LIBXML2_WORKAROUND
77 const char *program; /* Initialized with argv[0] */
78 const char *version = VERSION_STRING; /* Program version */
79 @@ -1681,6 +1684,11 @@ int main(int argc, char *argv[])
80 close(start_pipefd[1]);
84 +#ifdef LIBXML2_WORKAROUND
85 + void *dh = dlopen("libxml2.so", RTLD_NOW);
88 if (!master_read_master(master_list, age, 0)) {
89 master_kill(master_list);
91 @@ -1702,5 +1710,9 @@ int main(int argc, char *argv[])
95 +#ifdef LIBXML2_WORKAROUND
101 diff --git a/include/config.h.in b/include/config.h.in
102 index 942694c..9669872 100644
103 --- a/include/config.h.in
104 +++ b/include/config.h.in
106 /* Define to 1 if you have the <unistd.h> header file. */
109 +/* Use libxml2 tsd usage workaround */
110 +#undef LIBXML2_WORKAROUND
112 /* Define to the address where bug reports for this package should be sent. */
113 #undef PACKAGE_BUGREPORT
115 diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
116 index da52e71..49a9a9b 100644
117 --- a/modules/lookup_ldap.c
118 +++ b/modules/lookup_ldap.c
119 @@ -1998,9 +1998,6 @@ int lookup_done(void *context)
120 struct lookup_context *ctxt = (struct lookup_context *) context;
121 int rv = close_parse(ctxt->parse);
124 - ERR_free_strings();
126 autofs_sasl_done(ctxt);