85ad07
autofs-5.1.5 - openssl workaround
85ad07
85ad07
From: Ian Kent <raven@themaw.net>
85ad07
85ad07
Pre-open openssl libraries to prevent possible library unloads
85ad07
that could leave library static data undefined.
85ad07
85ad07
---
85ad07
 daemon/automount.c |   14 ++++++++++++++
85ad07
 1 file changed, 14 insertions(+)
85ad07
85ad07
--- autofs-5.0.7.orig/daemon/automount.c
85ad07
+++ autofs-5.0.7/daemon/automount.c
85ad07
@@ -2641,6 +2641,11 @@ int main(int argc, char *argv[])
85ad07
 		dh_tirpc = dlopen("libtirpc.so.1", RTLD_NOW);
85ad07
 #endif
85ad07
 
85ad07
+	void *dh_ossl10 = dlopen("libssl.so.10", RTLD_NOW);
85ad07
+	void *dh_crypto10 = dlopen("libcrypto.so.10", RTLD_NOW);
85ad07
+	void *dh_ossl6 = dlopen("libssl.so.6", RTLD_NOW);
85ad07
+	void *dh_crypto6 = dlopen("libcrypto.so.6", RTLD_NOW);
85ad07
+
85ad07
 	master_read = master_read_master(master_list, age, 0);
85ad07
 	if (!master_read) {
85ad07
 		/*
85ad07
@@ -2693,6 +2698,15 @@ int main(int argc, char *argv[])
85ad07
 	release_flag_file();
85ad07
 	macro_free_global_table();
85ad07
 
85ad07
+	if (dh_ossl10)
85ad07
+		dlclose(dh_ossl10);
85ad07
+	if (dh_crypto10)
85ad07
+		dlclose(dh_crypto10);
85ad07
+	if (dh_ossl6)
85ad07
+		dlclose(dh_ossl6);
85ad07
+	if (dh_crypto6)
85ad07
+		dlclose(dh_crypto6);
85ad07
+
85ad07
 #ifdef TIRPC_WORKAROUND
85ad07
 	if (dh_tirpc)
85ad07
 		dlclose(dh_tirpc);