Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 284

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.4 - libxml2 workaround fix

From: Ian Kent <raven@themaw.net>

Add a check for libxml2.so.2 for the libxml2 workaround in case libxml2.so
is not present.
---

 daemon/automount.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


--- autofs-5.0.1.orig/daemon/automount.c
+++ autofs-5.0.1/daemon/automount.c
@@ -2119,7 +2119,9 @@ int main(int argc, char *argv[])
 	}
 
 #ifdef LIBXML2_WORKAROUND
-	void *dh = dlopen("libxml2.so", RTLD_NOW);
+	void *dh_xml2 = dlopen("libxml2.so", RTLD_NOW);
+	if (!dh_xml2)
+		dh_xml2 = dlopen("libxml2.so.2", RTLD_NOW);
 #endif
 
 	if (!master_read_master(master_list, age, 0)) {
@@ -2145,8 +2147,8 @@ int main(int argc, char *argv[])
 	closelog();
 
 #ifdef LIBXML2_WORKAROUND
-	if (dh)
-		dlclose(dh);
+	if (dh_xml2)
+		dlclose(dh_xml2);
 #endif
 	info(logging, "autofs stopped");