summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-05-27 15:29:13 +0200
committerRemi Collet <remi@remirepo.net>2021-05-27 15:29:13 +0200
commite92de341379db0c283de206e6bba39ccd6c1c414 (patch)
tree8af7297d8876ae27fa5b88db5a8f91704391cf69
parente1665732d762383155349ff324a0d361019b741c (diff)
fix snmp extension build with net-snmp without DES
-rw-r--r--php-net-snmp.patch38
-rw-r--r--php.spec8
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..1284db5
--- /dev/null
+++ b/php-net-snmp.patch
@@ -0,0 +1,38 @@
+Backported from 8.0 for 7.2 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
+@@ -1228,15 +1228,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);
+ }
diff --git a/php.spec b/php.spec
index 609d89a..0c9646c 100644
--- a/php.spec
+++ b/php.spec
@@ -126,7 +126,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 4%{?dist}
+Release: 5%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -165,6 +165,8 @@ Patch6: php-5.6.3-embed.patch
Patch7: php-5.3.0-recode.patch
Patch8: php-7.2.0-libdb.patch
Patch9: php-7.0.7-curl.patch
+# backported from 8.0
+Patch10: php-net-snmp.patch
# Functional changes
Patch40: php-7.2.4-dlopen.patch
@@ -933,6 +935,7 @@ low-level PHP extension for the libsodium cryptographic library.
%if 0%{?rhel}
%patch9 -p1 -b .curltls
%endif
+%patch10 -p1 -b .nodes
%patch40 -p1 -b .dlopen
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 6
@@ -1927,6 +1930,9 @@ EOF
%changelog
+* Thu May 27 2021 Remi Collet <remi@remirepo.net> - 7.2.34-5
+- fix snmp extension build with net-snmp without DES
+
* Wed Apr 28 2021 Remi Collet <remi@remirepo.net> - 7.2.34-4
- Fix #80710 imap_mail_compose() header injection
- use oracle client library version 21.1