From fc25bbe4da751b59f55389e21c50632cabbd1fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= Date: Wed, 15 Sep 2021 08:01:33 +0200 Subject: [PATCH] Resolves: #2004351 - remove ERR_GET_FUNC from code --- net-snmp-5.9.1-remove-err-log.patch | 35 +++++++++++++++++++++++++++++ net-snmp.spec | 7 +++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 net-snmp-5.9.1-remove-err-log.patch diff --git a/net-snmp-5.9.1-remove-err-log.patch b/net-snmp-5.9.1-remove-err-log.patch new file mode 100644 index 0000000..a56188b --- /dev/null +++ b/net-snmp-5.9.1-remove-err-log.patch @@ -0,0 +1,35 @@ +diff -urNp a/include/net-snmp/library/snmp_openssl.h b/include/net-snmp/library/snmp_openssl.h +--- a/include/net-snmp/library/snmp_openssl.h 2021-09-15 07:55:39.829901038 +0200 ++++ b/include/net-snmp/library/snmp_openssl.h 2021-09-15 07:56:18.656412998 +0200 +@@ -44,7 +44,6 @@ extern "C" { + /* + * misc + */ +- void netsnmp_openssl_err_log(const char *prefix); + void netsnmp_openssl_null_checks(SSL *ssl, int *nullAuth, int *nullCipher); + + /* +diff -urNp a/snmplib/snmp_openssl.c b/snmplib/snmp_openssl.c +--- a/snmplib/snmp_openssl.c 2021-09-15 07:55:39.785900458 +0200 ++++ b/snmplib/snmp_openssl.c 2021-09-15 07:57:30.914417600 +0200 +@@ -937,20 +937,6 @@ netsnmp_openssl_cert_issued_by(X509 *iss + return (X509_check_issued(issuer, cert) == X509_V_OK); + } + +- +-#ifndef NETSNMP_FEATURE_REMOVE_OPENSSL_ERR_LOG +-void +-netsnmp_openssl_err_log(const char *prefix) +-{ +- unsigned long err; +- for (err = ERR_get_error(); err; err = ERR_get_error()) { +- snmp_log(LOG_ERR,"%s: %ld\n", prefix ? prefix: "openssl error", err); +- snmp_log(LOG_ERR, "library=%d, function=%d, reason=%d\n", +- ERR_GET_LIB(err), ERR_GET_FUNC(err), ERR_GET_REASON(err)); +- } +-} +-#endif /* NETSNMP_FEATURE_REMOVE_OPENSSL_ERR_LOG */ +- + void + netsnmp_openssl_null_checks(SSL *ssl, int *null_auth, int *null_cipher) + { diff --git a/net-snmp.spec b/net-snmp.spec index 941d261..e8d3a29 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: 9%{?dist} +Release: 10%{?dist} Epoch: 1 License: BSD @@ -52,6 +52,7 @@ Patch22: net-snmp-5.9-ECC-cert.patch Patch23: net-snmp-5.9-intermediate-certs.patch Patch24: net-snmp-5.9.1-remove-des.patch Patch25: net-snmp-5.9.1-autoconf.patch +Patch26: net-snmp-5.9.1-remove-err-log.patch # Modern RPM API means at least EL6 Patch101: net-snmp-5.8-modern-rpm-api.patch @@ -230,6 +231,7 @@ cp %{SOURCE10} . %patch23 -p1 -b .intermediate-certs %patch24 -p1 -b .remove-des %patch25 -p1 -b .autoconf +%patch26 -p1 -b .remove-err-log %patch101 -p1 -b .modern-rpm-api %patch102 -p1 @@ -499,6 +501,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test %{_libdir}/libnetsnmptrapd*.so.%{soname}* %changelog +* Wed Sep 15 2021 Josef Ridky - 1:5.9.1-10 +- Remove ERR_GET_FUNC from code (#2004351) + * Tue Sep 14 2021 Sahana Prasad - 1:5.9.1-9 - Rebuilt with OpenSSL 3.0.0