Blame SOURCES/autofs-5.1.5-openssl-workaround.patch

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