]> git.pld-linux.org Git - packages/autofs.git/blob - autofs-5.0.2-libxml2-workaround.patch
- rel.1, lets try
[packages/autofs.git] / autofs-5.0.2-libxml2-workaround.patch
1 diff --git a/CHANGELOG b/CHANGELOG
2 index c208b31..a2a782d 100644
3 --- a/CHANGELOG
4 +++ b/CHANGELOG
5 @@ -25,6 +25,7 @@
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.
10  
11  18/06/2007 autofs-5.0.2
12  -----------------------
13 diff --git a/aclocal.m4 b/aclocal.m4
14 index d0d8346..ffeb232 100644
15 --- a/aclocal.m4
16 +++ b/aclocal.m4
17 @@ -167,6 +167,19 @@ else
18    HAVE_LIBXML=1
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
24 +  then
25 +    XML_MINOR=`echo $XML_VER|cut -d\. -f2`
26 +    if test $XML_MINOR -le 6
27 +    then
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])
31 +      fi
32 +    fi
33 +  fi
34  fi])
35  
36  dnl --------------------------------------------------------------------------
37 diff --git a/configure b/configure
38 index b723d74..3508224 100755
39 --- a/configure
40 +++ b/configure
41 @@ -2498,6 +2498,23 @@ echo "${ECHO_T}yes" >&6; }
42    HAVE_LIBXML=1
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
48 +  then
49 +    XML_MINOR=`echo $XML_VER|cut -d\. -f2`
50 +    if test $XML_MINOR -le 6
51 +    then
52 +      XML_REV=`echo $XML_VER|cut -d\. -f3`
53 +      if test $XML_REV -le 99; then
54 +
55 +cat >>confdefs.h <<\_ACEOF
56 +#define LIBXML2_WORKAROUND 1
57 +_ACEOF
58 +
59 +      fi
60 +    fi
61 +  fi
62  fi
63  
64  #
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
69 @@ -40,6 +40,9 @@
70  #include <sys/utsname.h>
71  
72  #include "automount.h"
73 +#ifdef LIBXML2_WORKAROUND
74 +#include <dlfcn.h>
75 +#endif
76  
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]);
81                 exit(1);
82         }
83 +
84 +#ifdef LIBXML2_WORKAROUND
85 +       void *dh = dlopen("libxml2.so", RTLD_NOW);
86 +#endif
87 +
88         if (!master_read_master(master_list, age, 0)) {
89                 master_kill(master_list);
90                 *pst_stat = 3;
91 @@ -1702,5 +1710,9 @@ int main(int argc, char *argv[])
92         }
93         closelog();
94  
95 +#ifdef LIBXML2_WORKAROUND
96 +       if (dh)
97 +               dlclose(dh);
98 +#endif
99         exit(0);
100  }
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
105 @@ -60,6 +60,9 @@
106  /* Define to 1 if you have the <unistd.h> header file. */
107  #undef HAVE_UNISTD_H
108  
109 +/* Use libxml2 tsd usage workaround */
110 +#undef LIBXML2_WORKAROUND
111 +
112  /* Define to the address where bug reports for this package should be sent. */
113  #undef PACKAGE_BUGREPORT
114  
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);
122  #ifdef WITH_SASL
123 -       EVP_cleanup();
124 -       ERR_free_strings();
125 -
126         autofs_sasl_done(ctxt);
127  #endif
128         free_context(ctxt);
This page took 0.048105 seconds and 3 git commands to generate.