Fix build issues, reflect disabling of DES in net-snmp
This commit is contained in:
parent
8ff94c73ce
commit
5eed9b7b17
54
pegasus-2.14.1-build-fixes-2.patch
Normal file
54
pegasus-2.14.1-build-fixes-2.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
diff -up pegasus/src/Pegasus/Common/CIMName.h.orig pegasus/src/Pegasus/Common/CIMName.h
|
||||||
|
--- pegasus/src/Pegasus/Common/CIMName.h.orig 2008-12-02 10:00:43.000000000 +0100
|
||||||
|
+++ pegasus/src/Pegasus/Common/CIMName.h 2021-06-23 09:32:06.900922384 +0200
|
||||||
|
@@ -88,6 +88,8 @@ public:
|
||||||
|
*/
|
||||||
|
CIMName(const char* name);
|
||||||
|
|
||||||
|
+ CIMName(const CIMName& other) : cimName(other.cimName) {}
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
Assigns the value of the specified CIMName object to this object.
|
||||||
|
@param name The CIMName object from which to assign this
|
||||||
|
@@ -279,6 +281,8 @@ public:
|
||||||
|
*/
|
||||||
|
CIMNamespaceName(const char* name);
|
||||||
|
|
||||||
|
+ CIMNamespaceName(const CIMNamespaceName& other) : cimNamespaceName(other.cimNamespaceName) {}
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
Assigns the value of the specified CIMNamespaceName object to this
|
||||||
|
object.
|
||||||
|
diff -up pegasus/src/Pegasus/Common/Memory.h.orig pegasus/src/Pegasus/Common/Memory.h
|
||||||
|
--- pegasus/src/Pegasus/Common/Memory.h.orig 2008-12-02 10:00:48.000000000 +0100
|
||||||
|
+++ pegasus/src/Pegasus/Common/Memory.h 2021-06-23 09:32:06.901922405 +0200
|
||||||
|
@@ -59,7 +59,7 @@ PEGASUS_NAMESPACE_BEGIN
|
||||||
|
template<class T>
|
||||||
|
inline void Zeros(T* items, Uint32 size)
|
||||||
|
{
|
||||||
|
- memset(items, 0, sizeof(T) * size);
|
||||||
|
+ memset(static_cast<void*>(items), 0, sizeof(T) * size);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
@@ -157,7 +157,7 @@ inline void CopyToRaw(Real64* to, const
|
||||||
|
|
||||||
|
inline void CopyToRaw(Char16* to, const Char16* from, Uint32 size)
|
||||||
|
{
|
||||||
|
- memcpy(to, from, sizeof(Char16) * size);
|
||||||
|
+ memcpy(static_cast<void*>(to), from, sizeof(Char16) * size);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
diff -up pegasus/src/Pegasus/Common/Threads.h.orig pegasus/src/Pegasus/Common/Threads.h
|
||||||
|
--- pegasus/src/Pegasus/Common/Threads.h.orig 2013-02-13 19:21:14.000000000 +0100
|
||||||
|
+++ pegasus/src/Pegasus/Common/Threads.h 2021-06-23 09:32:06.901922405 +0200
|
||||||
|
@@ -245,7 +245,7 @@ inline bool Threads::null(const ThreadTy
|
||||||
|
|
||||||
|
inline void Threads::clear(ThreadType& x)
|
||||||
|
{
|
||||||
|
- memset(&x, 0, sizeof(x));
|
||||||
|
+ memset(static_cast<void*>(&x), 0, sizeof(x));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* defined(PEGASUS_HAVE_PTHREADS) */
|
52
pegasus-2.14.1-snmp-disable-des.patch
Normal file
52
pegasus-2.14.1-snmp-disable-des.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
diff -up pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.cpp.orig pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.cpp
|
||||||
|
--- pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.cpp.orig 2021-06-23 09:57:12.052712533 +0200
|
||||||
|
+++ pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.cpp 2021-06-23 10:06:19.893857294 +0200
|
||||||
|
@@ -247,6 +247,16 @@ void snmpDeliverTrap_netsnmp::_createSes
|
||||||
|
#ifdef PEGASUS_ENABLE_NET_SNMPV3
|
||||||
|
case _SNMPv3_TRAP:
|
||||||
|
{
|
||||||
|
+ if(snmpSecPrivProto == 1)
|
||||||
|
+ {
|
||||||
|
+ //DES is no longer supported.
|
||||||
|
+ PEG_METHOD_EXIT();
|
||||||
|
+ throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,
|
||||||
|
+ MessageLoaderParms(
|
||||||
|
+ _MSG_DES_NOT_SUPPORTED_KEY,
|
||||||
|
+ _MSG_DES_NOT_SUPPORTED));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
snmpSession.version = SNMP_VERSION_3;
|
||||||
|
CString securityNameCStr = securityName.getCString();
|
||||||
|
size_t securityNameLen = strlen(securityNameCStr);
|
||||||
|
@@ -321,14 +331,7 @@ void snmpDeliverTrap_netsnmp::_createSes
|
||||||
|
|
||||||
|
SNMP_FREE(snmpSession.securityPrivProto);
|
||||||
|
//Privacy
|
||||||
|
- if(snmpSecPrivProto == 1) //DES
|
||||||
|
- {
|
||||||
|
- snmpSession.securityPrivProto = snmp_duplicate_objid(
|
||||||
|
- usmDESPrivProtocol,
|
||||||
|
- USM_PRIV_PROTO_DES_LEN);
|
||||||
|
- snmpSession.securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN;
|
||||||
|
- }
|
||||||
|
- else if(snmpSecPrivProto == 2) // AES
|
||||||
|
+ if(snmpSecPrivProto == 2) // AES
|
||||||
|
{
|
||||||
|
snmpSession.securityPrivProto = snmp_duplicate_objid(
|
||||||
|
usmAESPrivProtocol,
|
||||||
|
diff -up pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.h.orig pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.h
|
||||||
|
--- pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.h.orig 2021-06-23 09:57:54.014119384 +0200
|
||||||
|
+++ pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpDeliverTrap_netsnmp.h 2021-06-23 10:05:04.489320833 +0200
|
||||||
|
@@ -64,6 +64,12 @@ static const char _MSG_VERSION_NOT_SUPPO
|
||||||
|
"Handler.snmpIndicationHandler.snmpDeliverTrap_netsnmp."
|
||||||
|
"_MSG_VERSION_NOT_SUPPORTED";
|
||||||
|
|
||||||
|
+static const char _MSG_DES_NOT_SUPPORTED[] =
|
||||||
|
+ "DES support is disabled in SNMP.";
|
||||||
|
+static const char _MSG_DES_NOT_SUPPORTED_KEY[] =
|
||||||
|
+ "Handler.snmpIndicationHandler.snmpDeliverTrap_netsnmp."
|
||||||
|
+ "_MSG_DES_NOT_SUPPORTED";
|
||||||
|
+
|
||||||
|
static const char _MSG_SESSION_SEND_FAILED[] =
|
||||||
|
"Snmp Indication Handler failed to send the trap: ";
|
||||||
|
static const char _MSG_SESSION_SEND_FAILED_KEY[] =
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Name: tog-pegasus
|
Name: tog-pegasus
|
||||||
Version: %{major_ver}.1
|
Version: %{major_ver}.1
|
||||||
Release: 59%{?dist}
|
Release: 60%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Summary: OpenPegasus WBEM Services for Linux
|
Summary: OpenPegasus WBEM Services for Linux
|
||||||
|
|
||||||
@ -104,6 +104,10 @@ Patch43: pegasus-2.14.1-fix-Wreserved-user-defined-literal.patch
|
|||||||
Patch44: pegasus-2.14.1-crypto-policy-compliance.patch
|
Patch44: pegasus-2.14.1-crypto-policy-compliance.patch
|
||||||
# 45: add required lib to fix FTBS
|
# 45: add required lib to fix FTBS
|
||||||
Patch45: pegasus-2.14.1-add-pegwsmserver-to-ldd-libs.patch
|
Patch45: pegasus-2.14.1-add-pegwsmserver-to-ldd-libs.patch
|
||||||
|
# 46: fixes FTBFS
|
||||||
|
Patch46: pegasus-2.14.1-build-fixes-2.patch
|
||||||
|
# 47: disable DES no longer supported in net-snmp
|
||||||
|
Patch47: pegasus-2.14.1-snmp-disable-des.patch
|
||||||
|
|
||||||
BuildRequires: procps, libstdc++, pam-devel
|
BuildRequires: procps, libstdc++, pam-devel
|
||||||
BuildRequires: openssl, openssl-devel
|
BuildRequires: openssl, openssl-devel
|
||||||
@ -257,6 +261,8 @@ yes | mak/CreateDmtfSchema 238 %{SOURCE9} cim_schema_2.38.0
|
|||||||
%patch43 -p1 -b .Wreserved-user-defined-literal-fix
|
%patch43 -p1 -b .Wreserved-user-defined-literal-fix
|
||||||
%patch44 -p1 -b .crypto-policy-compliance
|
%patch44 -p1 -b .crypto-policy-compliance
|
||||||
%patch45 -p1 -b .add-pegwsmserver-to-ldd-libs
|
%patch45 -p1 -b .add-pegwsmserver-to-ldd-libs
|
||||||
|
%patch46 -p1 -b .build-fixes-2
|
||||||
|
%patch47 -p1 -b .snmp-disable-des
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -558,6 +564,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 23 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2:2.14.1-60
|
||||||
|
- Fix build issues
|
||||||
|
- Reflect disabling of DES in net-snmp
|
||||||
|
|
||||||
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2:2.14.1-59
|
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2:2.14.1-59
|
||||||
- Rebuilt for updated systemd-rpm-macros
|
- Rebuilt for updated systemd-rpm-macros
|
||||||
See https://pagure.io/fesco/issue/2583.
|
See https://pagure.io/fesco/issue/2583.
|
||||||
|
Loading…
Reference in New Issue
Block a user