From d622fc4df5379bedfad1d8bbda0c4539d2a85e0d Mon Sep 17 00:00:00 2001 From: Josef Řídký Date: Oct 04 2021 13:51:07 +0000 Subject: Resolves: #2008781 - fix FTBFS for F36 --- diff --git a/net-snmp-5.9.1-remove-err-log.patch b/net-snmp-5.9.1-remove-err-log.patch index a56188b..42b17b2 100644 --- a/net-snmp-5.9.1-remove-err-log.patch +++ b/net-snmp-5.9.1-remove-err-log.patch @@ -33,3 +33,52 @@ diff -urNp a/snmplib/snmp_openssl.c b/snmplib/snmp_openssl.c void netsnmp_openssl_null_checks(SSL *ssl, int *null_auth, int *null_cipher) { +diff -urNp a/snmplib/transports/snmpTLSBaseDomain.c b/snmplib/transports/snmpTLSBaseDomain.c +--- a/snmplib/transports/snmpTLSBaseDomain.c 2021-09-15 07:55:39.784900445 +0200 ++++ b/snmplib/transports/snmpTLSBaseDomain.c 2021-10-04 15:35:48.157385970 +0200 +@@ -54,17 +54,6 @@ netsnmp_feature_require(cert_util); + + int openssl_local_index; + +-#ifndef HAVE_ERR_GET_ERROR_ALL +-/* A backport of the OpenSSL 1.1.1e ERR_get_error_all() function. */ +-static unsigned long ERR_get_error_all(const char **file, int *line, +- const char **func, +- const char **data, int *flags) +-{ +- *func = NULL; +- return ERR_get_error_line_data(file, line, data, flags); +-} +-#endif +- + /* this is called during negotiation */ + int verify_callback(int ok, X509_STORE_CTX *ctx) { + int err, depth; +@@ -1187,27 +1176,6 @@ void _openssl_log_error(int rc, SSL *con + ERR_reason_error_string(ERR_get_error())); + + } +- +- /* other errors */ +- while ((numerical_reason = +- ERR_get_error_all(&file, &line, &func, &data, &flags)) != 0) { +- snmp_log(LOG_ERR, "%s (file %s, func %s, line %d)\n", +- ERR_error_string(numerical_reason, NULL), file, func, line); +- +- /* if we have a text translation: */ +- if (data && (flags & ERR_TXT_STRING)) { +- snmp_log(LOG_ERR, " Textual Error: %s\n", data); +- /* +- * per openssl man page: If it has been allocated by +- * OPENSSL_malloc(), *flags&ERR_TXT_MALLOCED is true. +- * +- * arggh... stupid openssl prototype for ERR_get_error_line_data +- * wants a const char **, but returns something that we might +- * need to free?? +- */ +- if (flags & ERR_TXT_MALLOCED) +- OPENSSL_free(NETSNMP_REMOVE_CONST(void *, data)); } +- } + + snmp_log(LOG_ERR, "---- End of OpenSSL Errors ----\n"); + } diff --git a/net-snmp.spec b/net-snmp.spec index e7d0282..3d634b5 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -10,7 +10,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.9.1 -Release: 11%{?dist} +Release: 12%{?dist} Epoch: 1 License: BSD @@ -501,6 +501,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test %{_libdir}/libnetsnmptrapd*.so.%{soname}* %changelog +* Mon Oct 04 2021 Josef Ridky - 1:5.9.1-12 +- fix FTBFS of ERR_get_error (#2008781) + * Wed Sep 15 2021 Sahana Prasad - 1:5.9.1-11 - Rebuilt with OpenSSL 3.0.0