[PATCH 1/1] Just warn if linked libssl is more recent

Christian Hesse list at eworm.de
Tue Jun 17 08:12:02 CEST 2014


From: Christian Hesse <mail at eworm.de>

Even if dynamic linking is just fine, radiusd fails after ever openssl
update. (Distribution toolkits do not detect this, so distribution
packages break on a regular basis.)
This changes behavior so that it still fails on library downgrade, but
just warns if openssl library has been upgraded.
---
 src/main/version.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/main/version.c b/src/main/version.c
index fb72c86..289a4f3 100644
--- a/src/main/version.c
+++ b/src/main/version.c
@@ -48,13 +48,17 @@ int ssl_check_consistency(void)
 
 	ssl_linked = SSLeay();
 
-	if (ssl_linked != ssl_built) {
-		ERROR("libssl version mismatch.  built: %lx linked: %lx",
+	if (ssl_linked < ssl_built) {
+		ERROR("libssl version mismatch. built: %lx linked: %lx",
 		       (unsigned long) ssl_built,
 		       (unsigned long) ssl_linked);
 
 		return -1;
-	};
+	} else if (ssl_linked > ssl_built) {
+		WARN("libssl version mismatch. built: %lx linked: %lx",
+			(unsigned long) ssl_built,
+			(unsigned long) ssl_linked);
+	}
 
 	return 0;
 }
-- 
2.0.0



More information about the Freeradius-Devel mailing list