diff options
| author | Remi Collet <remi@remirepo.net> | 2021-05-27 15:29:01 +0200 | 
|---|---|---|
| committer | Remi Collet <remi@remirepo.net> | 2021-05-27 15:29:01 +0200 | 
| commit | b44b00749fad27d84bd9baae0887e0ed7bc8de2c (patch) | |
| tree | a390442df9cb731a312830cd2635f726fb016ec6 | |
| parent | cb703d766dde468048e8a328577fd9f914946b7e (diff) | |
fix snmp extension build with net-snmp without DES
| -rw-r--r-- | php-net-snmp.patch | 38 | ||||
| -rw-r--r-- | php.spec | 8 | 
2 files changed, 45 insertions, 1 deletions
| diff --git a/php-net-snmp.patch b/php-net-snmp.patch new file mode 100644 index 0000000..7b8de60 --- /dev/null +++ b/php-net-snmp.patch @@ -0,0 +1,38 @@ +Backported from 8.0 for 7.1 by Remi + + +From f9fd3595ecb36c8dc6add0515782a18f15216d77 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +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 +@@ -1263,15 +1263,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) + { ++#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, E_WARNING, "Unknown security protocol '%s'", prot); + 		return (-1); + 	} @@ -126,7 +126,7 @@  Summary: PHP scripting language for creating dynamic web sites  Name: %{?scl_prefix}php  Version: %{upver}%{?rcver:~%{rcver}} -Release: 13%{?dist} +Release: 14%{?dist}  # All files licensed under PHP version 3.01, except  # Zend is licensed under Zend  # TSRM is licensed under BSD @@ -166,6 +166,8 @@ Patch6: php-5.6.3-embed.patch  Patch7: php-5.3.0-recode.patch  Patch8: php-7.0.2-libdb.patch  Patch9: php-7.0.7-curl.patch +# backported from 8.0 +Patch10: php-net-snmp.patch  # Functional changes  Patch40: php-7.1.16-dlopen.patch @@ -925,6 +927,7 @@ support for JavaScript Object Notation (JSON) to PHP.  %if 0%{?rhel}  %patch9 -p1 -b .curltls  %endif +%patch10 -p1 -b .nodes  %patch40 -p1 -b .dlopen  %if 0%{?fedora} >= 25 || 0%{?rhel} >= 6 @@ -1932,6 +1935,9 @@ EOF  %changelog +* Thu May 27 2021 Remi Collet <remi@remirepo.net> - 7.1.33-14 +- fix snmp extension build with net-snmp without DES +  * Wed Apr 28 2021 Remi Collet <remi@remirepo.net> - 7.1.33-13  - Fix #80710 imap_mail_compose() header injection  - use oracle client library version 21.1 | 
