[tog-pegasus] Fix cmpi: CMGetKey() returns wrong data type for some data types
vcrhonek
vcrhonek at fedoraproject.org
Tue Jul 1 10:46:50 UTC 2014
commit 399e421272e33bf020559bc68f56aa074403ca53
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date: Tue Jul 1 12:46:51 2014 +0200
Fix cmpi: CMGetKey() returns wrong data type for some data types
pegasus-2.13.0-CMGetKey-data-type-fix.patch | 60 +++++++++++++++++++++++++++
tog-pegasus.spec | 14 ++++--
2 files changed, 70 insertions(+), 4 deletions(-)
---
diff --git a/pegasus-2.13.0-CMGetKey-data-type-fix.patch b/pegasus-2.13.0-CMGetKey-data-type-fix.patch
new file mode 100644
index 0000000..794191f
--- /dev/null
+++ b/pegasus-2.13.0-CMGetKey-data-type-fix.patch
@@ -0,0 +1,60 @@
+Index: src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp
+===================================================================
+RCS file: /cvs/MSB/pegasus/src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp 13 Feb 2013 11:40:04 -0000 1.4
++++ src/Pegasus/ProviderManager2/CMPI/CMPISCMOUtilities.cpp 7 Apr 2014 09:52:59 -0000 1.5
+@@ -266,28 +266,14 @@
+ data->value.boolean=scmoValue->simple.val.bin;
+ data->type=CMPI_keyBoolean;
+ break;
+-
+ case CMPI_real32:
+- {
+- char buffer[128];
+- Uint32 size=0;
+- Real32ToString(buffer, scmoValue->simple.val.r32, size);
+- data->value.string = reinterpret_cast<CMPIString*>(
+- new CMPI_Object(buffer));
+- data->type=CIMKeyBinding::STRING;
+- break;
+- }
+-
++ data->value.real32=(CMPIReal32)scmoValue->simple.val.r32;
++ data->type=CMPI_real32;
++ break;
+ case CMPI_real64:
+- {
+- char buffer[128];
+- Uint32 size=0;
+- Real64ToString(buffer, scmoValue->simple.val.r64, size);
+- data->value.string = reinterpret_cast<CMPIString*>(
+- new CMPI_Object(buffer));
+- data->type=CIMKeyBinding::STRING;
+- break;
+- }
++ data->value.real64=(CMPIReal64)scmoValue->simple.val.r64;
++ data->type=CMPI_real64;
++ break;
+
+ case CMPI_charsptr:
+ case CMPI_chars:
+@@ -309,11 +295,11 @@
+
+ case CMPI_dateTime:
+ {
+- char buffer[26];
+- _DateTimetoCStr(scmoValue->dateTimeValue, buffer);
+- data->value.string = reinterpret_cast<CMPIString*>(
+- new CMPI_Object(buffer));
+- data->type=CIMKeyBinding::STRING;
++ CIMDateTime* cimdt =
++ new CIMDateTime(&scmoValue->dateTimeValue);
++ data->value.dateTime = reinterpret_cast<CMPIDateTime*>
++ (new CMPI_Object(cimdt));
++ data->type=CMPI_dateTime;
+ break;
+ }
+
diff --git a/tog-pegasus.spec b/tog-pegasus.spec
index 8ebb5c2..f7ee69f 100644
--- a/tog-pegasus.spec
+++ b/tog-pegasus.spec
@@ -8,7 +8,7 @@
Name: tog-pegasus
Version: %{major_ver}.0
-Release: 13%{?dist}
+Release: 14%{?dist}
Epoch: 2
Summary: OpenPegasus WBEM Services for Linux
@@ -81,12 +81,13 @@ Patch27: pegasus-2.13.0-build-fix.patch
Patch28: pegasus-2.13.0-PG_ComputerSystem.CreationClassName.patch
# 29: bz#1049314, allow unprivileged users to subscribe to indications by default
Patch29: pegasus-2.13.0-enable-subscriptions-for-nonprivileged-users.patch
-
-BuildRequires: procps, libstdc++, pam-devel
-BuildRequires: openssl, openssl-devel
# 30: Create x509v3 self-signed certificates with CA:FALSE
Patch30: pegasus-2.13.0-SSLGeneration.patch
+# 31: bz#1111571, backported from upstream
+Patch31: pegasus-2.13.0-CMGetKey-data-type-fix.patch
+BuildRequires: procps, libstdc++, pam-devel
+BuildRequires: openssl, openssl-devel
BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++
BuildRequires: libstdc++, make, pam-devel
BuildRequires: openssl-devel
@@ -229,6 +230,7 @@ yes | mak/CreateDmtfSchema 238 %{SOURCE9} cim_schema_2.38.0
%patch28 -p0 -b .PG_ComputerSystem.CreationClassName
%patch29 -p1 -b .enable-subscriptions-for-nonprivileged-users
%patch30 -p1 -b .genssl
+%patch31 -p0 -b .CMGetKey-data-type-fix
%build
@@ -505,6 +507,10 @@ fi
%changelog
+* Tue Jul 01 2014 Vitezslav Crhonek <vcrhonek at redhat.com> - 2:2.13.0-14
+- Fix cmpi: CMGetKey() returns wrong data type for some data types
+ Resolves: #1111571
+
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2:2.13.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list