From 59cc28990edb595a5cabe00204a14fa4ce5400ab Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 27 May 2021 15:28:27 +0200 Subject: fix snmp extension build with net-snmp without DES --- php-net-snmp.patch | 38 ++++++++++++++++++++++++++++++++++++++ php.spec | 8 +++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 php-net-snmp.patch diff --git a/php-net-snmp.patch b/php-net-snmp.patch new file mode 100644 index 0000000..6b8c1a8 --- /dev/null +++ b/php-net-snmp.patch @@ -0,0 +1,38 @@ +Backported from 8.0 for 5.6 by Remi + + +From f9fd3595ecb36c8dc6add0515782a18f15216d77 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 27 May 2021 14:20:07 +0200 +Subject: [PATCH] Fix snmp build without DES + +--- + ext/snmp/snmp.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c +index 35d19c8738828..d31995827880d 100644 +--- a/ext/snmp/snmp.c ++++ b/ext/snmp/snmp.c +@@ -1282,15 +1282,19 @@ static int netsnmp_session_set_auth_prot + Set the security protocol in the snmpv3 session */ + static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot TSRMLS_DC) + { ++#ifndef NETSNMP_DISABLE_DES + if (!strcasecmp(prot, "DES")) { + s->securityPrivProto = usmDESPrivProtocol; + s->securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN; ++ } else ++#endif + #ifdef HAVE_AES +- } else if (!strcasecmp(prot, "AES128") || !strcasecmp(prot, "AES")) { ++ if (!strcasecmp(prot, "AES128") || !strcasecmp(prot, "AES")) { + s->securityPrivProto = usmAESPrivProtocol; + s->securityPrivProtoLen = USM_PRIV_PROTO_AES_LEN; ++ } else + #endif +- } else { ++ { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown security protocol '%s'", prot); + return (-1); + } diff --git a/php.spec b/php.spec index 2354588..33ed25f 100644 --- a/php.spec +++ b/php.spec @@ -132,7 +132,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php Version: 5.6.40 -Release: 26%{?dist} +Release: 27%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -171,6 +171,8 @@ Patch8: php-5.6.17-libdb.patch Patch9: php-5.5.30-curl.patch Patch10: php-5.6.37-icu62.patch Patch11: php-5.6.40-gcc10.patch +# backported from 8.0 +Patch12: php-net-snmp.patch # Functional changes Patch40: php-5.4.0-dlopen.patch @@ -950,6 +952,7 @@ support for using the enchant library to PHP. %patch10 -p1 -b .icu62 %endif %patch11 -p1 -b .gcc10 +%patch12 -p1 -b .nodes %patch40 -p1 -b .dlopen %patch41 -p1 -b .dtrace @@ -1962,6 +1965,9 @@ EOF %changelog +* Thu May 27 2021 Remi Collet - 5.6.40-27 +- fix snmp extension build with net-snmp without DES + * Wed Apr 28 2021 Remi Collet - 5.6.40-26 - Fix #80710 imap_mail_compose() header injection - use oracle client library version 21.1 -- cgit