Hello community,
here is the log from the commit of package sblim-sfcb for openSUSE:Factory
checked in at Thu Mar 11 01:51:41 CET 2010.
--------
--- sblim-sfcb/sblim-sfcb.changes 2009-11-03 20:22:32.000000000 +0100
+++ /mounts/work_src_done/STABLE/sblim-sfcb/sblim-sfcb.changes 2010-03-10 21:17:06.000000000 +0100
@@ -2 +2 @@
-Tue Nov 3 19:09:44 UTC 2009 - coolo@novell.com
+Wed Mar 10 20:14:07 UTC 2010 - kkaempf@novell.com
@@ -4 +4,2 @@
-- updated patches to apply with fuzz=0
+- prefer CMPI_chars over CMPI_classNameString
+ (bnc#578189, upstream #2968198)
@@ -7 +8 @@
-Tue Jul 14 14:28:26 CEST 2009 - aj@suse.de
+Tue Mar 9 13:16:49 UTC 2010 - kkaempf@novell.com
@@ -9 +10,106 @@
-- Add 0370-limits.patch to fix build failure.
+- Backport patches from 1.3.8
+
+ * args.c, array.c, constClass.c, instance.c, internalProvider.c,
+ objectpath.c:
+ [ 2948647 ] getObjectPath may dereference NULL pointer
+ * internalProvider.c:
+ [ 2952616 ] internalProvider is not Threadsafe
+ (bnc#580804)
+ * providerMgr.c:
+ [ 2952912 ] resultSockets variable is not used threadsafe
+ (bnc#580802)
+ * indCIMXMLHandler.c:
+ [ 2950773 ] Leak in indCIMXMLHandler.c
+ * interopServerProvider.c:
+ [ 2949454 ] Memory leak in ServerProviderInitInstances()
+
+-------------------------------------------------------------------
+Mon Feb 22 19:29:16 UTC 2010 - kkaempf@novell.com
+
+- Update to 1.3.7
+ (numbers are from the sourceforge.net bug tracker)
+ New features:
+ - 2920773 Tests for reliable indications
+
+ Bugs fixed:
+
+ - 2891367 Error processing content-length
+ - 2933087 Small leak in cimXmlRequest:getProperty()
+ - 2932809 sfcb 1.3.6 crashes when provider user is set to sfcb
+ - 2934540 sfcb may respond with incorrect association provider
+ - 2935931 Indications to file:// urls never fail.
+ - 2937577 Some SLP-specific code not ifdef'd
+ - 2939874 Serious provider id mismatch after provider reload
+ - 2655854 Common Provider invokes Init and CleanUp more than once
+ - 2875050 default MOFs should allow for multiple files
+ - 2945277 SFCB crashes on subscription without filter or handler prop
+ - 2946106 possible race condition initializing providers
+ - 2931327 sblim-sfcb-1.3.6 tarball is incomplete
+ - 2946885 BEAM errors found in cimXmlGen
+ - 2946890 classProvider may try to closedir(NULL)
+ - 2948812 footprint.pl missing from release tarball
+
+-------------------------------------------------------------------
+Fri Jan 15 13:26:05 UTC 2010 - kkaempf@novell.com
+
+- 0420-minimal-postinstall.patch: ensure providerRegister
+ is installed
+- 0430-fileRepository-opendir-error: print the directory path
+ if opendir() fails
+
+-------------------------------------------------------------------
+Fri Jan 15 12:37:17 UTC 2010 - kkaempf@novell.com
+
+- check provuser before strdup (bnc#570943, sblim#2932809)
+
+-------------------------------------------------------------------
+Thu Jan 14 10:11:55 UTC 2010 - kkaempf@novell.com
+
+- Adapt 0007-automake.patch to apply without fuzz
+
+-------------------------------------------------------------------
+Thu Jan 14 07:51:45 UTC 2010 - kkaempf@novell.com
+
+- Upgrade to 1.3.6
+ - regular quarterly release, and includes the usual
+ bugfixes related to function, stability, and memory usage
+ - Compliance for Indication Profile 1.0.0 (DSP1054).
+ - [Experimental] Reduced class repositories (~90% reduction
+ in disk footprint of classSchema file]
+ - move all libraries to /usr/lib(64)/sfcb/*
+
+-------------------------------------------------------------------
+Thu Dec 17 10:27:48 CET 2009 - kukuk@suse.de
+
+- Don't start by default, will be handled by YaST2 module
+
+-------------------------------------------------------------------
+Thu Dec 3 13:22:05 UTC 2009 - kkaempf@novell.com
+
+- Added configuration for SUSEfirewall (fate#305583)
+
+-------------------------------------------------------------------
+Wed Nov 4 16:10:04 MST 2009 - bwhiteley@suse.de
+
+- Upgrade to 1.3.5 (fate#307413)
+- Reduce PAM messages in syslog (fate#306380, bnc#497043,
+ sblim bug#2762848)
+- Start sfcbd by default (fate#305583)
+- Enable SLP (fate#307088)
+- Fix objectImplc.c:dataValueToString() (bnc#483396)
+
+-------------------------------------------------------------------
+Tue Jun 23 09:47:25 CEST 2009 - kkaempf@suse.de
+
+- Fix memory corruption in CMSetProperty. (bnc#483526)
+
+-------------------------------------------------------------------
+Thu Jun 18 16:25:15 CEST 2009 - kkaempf@suse.de
+
+- 'cimcli' sends 'Content-length:' header attribute with leading
+ zeroes which got interpreted as octal. (bnc#507249)
+
+-------------------------------------------------------------------
+Tue Feb 3 14:17:39 CET 2009 - meissner@suse.de
+
+- enhanced tmprace patch a bit (bnc#470203)
calling whatdependson for head-i586
Old:
----
0003-align.patch
0006-Werror.patch
0009-clean-up-semaphore-array-index-calculation.patch
0011-check-prevent-various-buffer-overflows.patch
0015-fix-potential-memory-leak.patch
0016-check-result-from-_methProvider.patch
0018-buffer-size-check-in-localConnectServer.patch
0019-internal_provider.patch
0100-check_length_sanity.patch
0110-2164750-sfcb_handle_malformed_requests.patch
0120-max_content_length.patch
0130-2169514-check_malloc.patch
0140-2169527-attrsOk_alloca_fix.patch
0150-2169607-strcpy.patch
0160-2158198-syslog.patch
0170-2172023-mlogf.patch
0180-2175507-alloca_sockaddr.patch
0190-2189391-fix-fork-race-in-getProcess.patch
0200-2192023-Fix-nsHt-deadlock.patch
0210-2185304-shutdown_deadlock_remove_mlogf.patch
0220-2189234-minimal-provider-count-is-3-4-with-interOpProvider.patch
0230-2169807-435882-xml-char-ref.patch
0240-msgqueue_unlink.patch
0250-bnc444403-access_control.patch
0260-2390100-mlogf-args.patch
0270-max_content_length2.patch
0280-decode64.patch
0290-bnc445795-2095972-startup_hang.patch
0300-bnc425457-2169514-limit_message_size.patch
0310-bnc457768-2433594-unaligned_access.patch
0320-bnc457366A-2140807-static_instances.patch
0330-bnc457366B-2441640-mofc_instance_migration.patch
0340-bnc458541-2479947-valueList.patch
0350-bnc466666-2093567-ref-quals.patch
0360-bnc470203-genSslCert-mktemp.patch
0370-limits.patch
sblim-sfcb-1.3.2.tar.bz2
New:
----
0012-check-prevent-various-buffer-overflows.patch
0090-buffer-size-check-in-localConnectServer.patch
0390-control_c_limit_h.patch
0420-minimal-postinstall.patch
0430-fileRepository-opendir-error.patch
10001-2949454-Memory-leak-in-ServerProviderInitInstances.patch
10002-2950773-Leak-in-indCIMXMLHandler.c.patch
10005-2952912-resultSockets-variable-is-not-used-threadsaf.patch
10006-2952616-internalProvider-is-not-Threadsafe.patch
10007-2948647-getObjectPath-may-dereference-NULL-pointer.patch
10008-2967257-prefer-CMPI_chars-over-CMPI_classNameString.patch
sblim-sfcb-1.3.7.tar.bz2
sblim-sfcb-rpmlintrc
susefirewall.conf
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sblim-sfcb.spec ++++++
--- /var/tmp/diff_new_pack.O8Du2e/_old 2010-03-11 01:50:43.000000000 +0100
+++ /var/tmp/diff_new_pack.O8Du2e/_new 2010-03-11 01:50:43.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package sblim-sfcb (Version 1.3.2)
+# spec file for package sblim-sfcb (Version 1.3.7)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,10 +20,10 @@
Summary: Small Footprint CIM Broker
Name: sblim-sfcb
-Version: 1.3.2
-Release: 21
+Version: 1.3.7
+Release: 1
Group: System/Management
-License: CPL 1.0
+License: Other uncritical OpenSource License ; "CPL 1.0 ..." ; CPL 1.0
Url: http://sblim.sf.net/
Source0: %{name}-%{version}.tar.bz2
Source1: autoconfiscate.sh
@@ -32,46 +32,30 @@
%endif
Source3: autoconfiscate.sh-mofc
Source4: sfcb-pam.conf
+Source5: %{name}-rpmlintrc
+Source6: susefirewall.conf
Patch1: 0001-uds_auth.patch
-Patch3: 0003-align.patch
-Patch6: 0006-Werror.patch
Patch7: 0007-automake.patch
Patch8: 0008-enable-hex-trace-mask.patch
-Patch9: 0009-clean-up-semaphore-array-index-calculation.patch
-Patch11: 0011-check-prevent-various-buffer-overflows.patch
-Patch15: 0015-fix-potential-memory-leak.patch
-Patch16: 0016-check-result-from-_methProvider.patch
+Patch12: 0012-check-prevent-various-buffer-overflows.patch
Patch17: 0017-abort-on-socket-error-with-better-error-msg.patch
-Patch18: 0018-buffer-size-check-in-localConnectServer.patch
-Patch19: 0019-internal_provider.patch
-Patch100: 0100-check_length_sanity.patch
-Patch110: 0110-2164750-sfcb_handle_malformed_requests.patch
-Patch120: 0120-max_content_length.patch
-Patch130: 0130-2169514-check_malloc.patch
-Patch140: 0140-2169527-attrsOk_alloca_fix.patch
-Patch150: 0150-2169607-strcpy.patch
-Patch160: 0160-2158198-syslog.patch
-Patch170: 0170-2172023-mlogf.patch
-Patch180: 0180-2175507-alloca_sockaddr.patch
-Patch190: 0190-2189391-fix-fork-race-in-getProcess.patch
-Patch200: 0200-2192023-Fix-nsHt-deadlock.patch
-Patch210: 0210-2185304-shutdown_deadlock_remove_mlogf.patch
-Patch220: 0220-2189234-minimal-provider-count-is-3-4-with-interOpProvider.patch
-Patch230: 0230-2169807-435882-xml-char-ref.patch
-Patch240: 0240-msgqueue_unlink.patch
-Patch250: 0250-bnc444403-access_control.patch
-Patch260: 0260-2390100-mlogf-args.patch
-Patch270: 0270-max_content_length2.patch
-Patch280: 0280-decode64.patch
-Patch290: 0290-bnc445795-2095972-startup_hang.patch
-Patch300: 0300-bnc425457-2169514-limit_message_size.patch
-Patch310: 0310-bnc457768-2433594-unaligned_access.patch
-Patch320: 0320-bnc457366A-2140807-static_instances.patch
-Patch330: 0330-bnc457366B-2441640-mofc_instance_migration.patch
-Patch340: 0340-bnc458541-2479947-valueList.patch
-Patch350: 0350-bnc466666-2093567-ref-quals.patch
-Patch360: 0360-bnc470203-genSslCert-mktemp.patch
-Patch370: 0370-limits.patch
+Patch18: 0090-buffer-size-check-in-localConnectServer.patch
+Patch390: 0390-control_c_limit_h.patch
+
+# dont wget the cim-schema
+Patch420: 0420-minimal-postinstall.patch
+
+# print path failing opendir()
+Patch430: 0430-fileRepository-opendir-error.patch
+
+# from http://github.com/kkaempf/sblim-sfcb/branches/sles11-sp1
+Patch10001: 10001-2949454-Memory-leak-in-ServerProviderInitInstances.patch
+Patch10002: 10002-2950773-Leak-in-indCIMXMLHandler.c.patch
+Patch10003: 10005-2952912-resultSockets-variable-is-not-used-threadsaf.patch
+Patch10004: 10006-2952616-internalProvider-is-not-Threadsafe.patch
+Patch10005: 10007-2948647-getObjectPath-may-dereference-NULL-pointer.patch
+Patch10006: 10008-2967257-prefer-CMPI_chars-over-CMPI_classNameString.patch
+
Provides: cimserver
Provides: cim-server
%if 0%{?suse_version} >= 1030
@@ -79,13 +63,23 @@
%else
BuildRequires: curl-devel
%endif
+BuildRequires: libtool
BuildRequires: zlib-devel
BuildRequires: openssl-devel
BuildRequires: pam-devel
BuildRequires: cim-schema
+BuildRequires: sblim-sfcc-devel
+%if 0%{?rhel_version} != 501
+BuildRequires: openslp-devel
+%endif
BuildRequires: bison flex
+BuildRequires: unzip
+
Requires: curl
+%if 0%{?suse_version} < 1120
+# unneeded explicit lib dependency
Requires: zlib
+%endif
Requires: openssl
Requires: pam
# Added NWP - dependency on cim-schema instead of inbuilt schema
@@ -104,47 +98,22 @@
%prep
%setup -q
%patch1 -p1 -b .0001-uds_auth.patch
-%patch3 -p1 -b .0003-align.patch
-%patch6 -p1 -b .0006-Werror.patch
%patch7 -p1 -b .0007-automake.patch
%patch8 -p1 -b .0008-enable-hex-trace-mask.patch
-%patch9 -p1 -b .0009-clean-up-semaphore-array-index-calculation.patch
-%patch11 -p1 -b .0011-check-prevent-various-buffer-overflows.patch
-%patch15 -p1 -b .0015-fix-potential-memory-leak.patch
-%patch16 -p1 -b .0016-check-result-from-_methProvider.patch
+%patch12 -p1 -b .0012-check-prevent-various-buffer-overflows.patch
%patch17 -p1 -b .0017-abort-on-socket-error-with-better-error-msg.patch
-%patch18 -p1 -b .0018-buffer-size-check-in-localConnectServer.patch
-%patch19 -p0 -b .0019-internal_provider.patch
-%patch100 -p0 -b .0100-check_length_sanity.patch
-%patch110 -p0 -b .0110-2164750-sfcb_handle_malformed_requests.patch
-%patch120 -p0 -b .0120-max_content_length.patch
-%patch130 -p0 -b .0130-2169514-check_malloc.patch
-%patch140 -p0 -b .0140-2169527-attrsOk_alloca_fix.patch
-%patch150 -p0 -b .0150-2169607-strcpy.patch
-%patch160 -p0 -b .0160-2158198-syslog.patch
-%patch170 -p0 -b .0170-2172023-mlogf.patch
-%patch180 -p0 -b .0180-2175507-alloca_sockaddr.patch
-%patch190 -p1 -b .0190-2189391-fix-fork-race-in-getProcess.patch
-%patch200 -p1 -b .0200-2192023-Fix-nsHt-deadlock.patch
-%patch210 -p0 -b .0210-2185304
-%patch220 -p1 -b .0220-2189234-minimal-provider-count-is-3-4-with-interOpProvider.patch
-%patch230 -p0 -b .0230-2169807-435882-xml-char-ref.patch
-%patch240 -p0 -b .0240-msgqueue_unlink.patch
-%patch250 -p0 -b .0250-bnc444403-access_control.patch
-%patch260 -p0 -b .0260-2390100-mlogf-args.patch
-%patch270 -p0 -b .0270-max_content_length2.patch
-%patch280 -p0 -b .0280-decode64.patch
-%patch290 -p0 -b .0290-bnc445795-2095972-startup_hang.patch
-%patch300 -p0 -b .0300-bnc425457-2169514-limit_message_size.patch
-%patch310 -p0 -b .0310-bnc457768-2433594-unaligned_access.patch
-%patch320 -p0 -b .0320-bnc457366A-2140807-static_instances.patch
-cd mofc
-%patch330 -p0 -b .0330-bnc457366B-2441640-mofc_instance_migration.patch
-cd ..
-%patch340 -p0 -b .0340-bnc458541-2479947-valueList.patch
-%patch350 -p0 -b .0350-bnc466666-2093567-ref-quals.patch
-%patch360 -p0 -b .0360-bnc470203-genSslCert-mktemp.patch
-%patch370 -p0 -b .0370-limits.patch
+%patch18 -p1 -b .0090-buffer-size-check-in-localConnectServer.patch
+%patch390 -p1 -b .0390-control_c_limit_h.patch
+%patch420 -p0 -b .0420-minimal-postinstall.patch
+%patch430 -p0 -b .0430-fileRepository-opendir-error.patch
+
+%patch10001 -p1
+%patch10002 -p1
+%patch10003 -p1
+%patch10004 -p1
+%patch10005 -p1
+%patch10006 -p1
+
export PATCH_GET=0
%build
@@ -152,15 +121,40 @@
cp %SOURCE1 .
cp %SOURCE3 mofc/autoconfiscate.sh
chmod +x mofc/autoconfiscate.sh
+# 1.3.6 tarball seems incomplete. (issue #2931327 upstream)
+# might be able to remove the following workaround in a future version.
+mkdir -p test/finaltest
+mkdir -p test/TestProviders/tests
+mkdir -p test/commands
+mkdir -p test/wbemcli
+mkdir -p test/xmltest
+mkdir -p test/unittest
+mkdir -p test/slptest
+mkdir -p test/localtests
+touch test/finaltest/Makefile.in
+touch test/TestProviders/tests/Makefile.in
+touch test/commands/Makefile.in
+touch test/wbemcli/Makefile.in
+touch test/xmltest/Makefile.in
+touch test/unittest/Makefile.in
+touch test/slptest/Makefile.in
+touch test/localtests/Makefile.in
sh ./autoconfiscate.sh
#if test -d mofc; then cd mofc && autoreconf -f -i; fi
#%%configure --enable-debug --enable-ssl --enable-pam --enable-ipv6 CIMSCHEMA_SOURCE=%{SOURCE1} CIMSCHEMA_MOF=cimv216.mof CIMSCHEMA_SUBDIRS=y
mkdir -p m4
-%configure --enable-debug --enable-ssl --enable-pam --enable-ipv6
+%if 0%{?rhel_version} == 501
+WITH_SLP=
+%else
+WITH_SLP=--enable-slp
+%endif
+%configure --enable-debug --enable-ssl --enable-pam --enable-ipv6 \
+ --enable-uds $WITH_SLP
make
%install
%makeinstall
+make postinstall DESTDIR=$RPM_BUILD_ROOT
# comment out - NWP - removing schema pkg
#make DESTDIR=$RPM_BUILD_ROOT install-cimschema
# remove docs from wrong dir. They are handled by %doc macro in files list
@@ -179,6 +173,12 @@
# Added NWP 5/14/08 - transition to using cim-schema rpm instead of internal-built schema
ln -sf /usr/share/mof/cim-current $RPM_BUILD_ROOT/%{_datadir}/sfcb/CIM
install -m 0644 %SOURCE4 $RPM_BUILD_ROOT/etc/pam.d/sfcb
+rm $RPM_BUILD_ROOT%{_libdir}/sfcb/*.la
+%if 0%{?suse_version}
+# firewall service definition
+mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services
+install -m 0644 %SOURCE6 $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/sblim-sfcb
+%endif
echo "%defattr(-,root,root)" > _pkg_list
# Added NWP 5/14/08 - moved from 'files schema'
echo "%dir %{_datadir}/sfcb/" >> _pkg_list
@@ -190,15 +190,19 @@
mv -f _pkg_list_2 _pkg_list
echo "%dir %{_libdir}/cmpi/" >> _pkg_list
echo "%dir %{_sysconfdir}/sfcb/" >> _pkg_list
+echo "%dir %{_libdir}/sfcb" >> _pkg_list
echo "%config %{_sysconfdir}/sfcb/*" >> _pkg_list
echo "%config %{_sysconfdir}/pam.d/*" >> _pkg_list
+%if 0%{?suse_version}
+echo "%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/sblim-sfcb" >> _pkg_list
+%endif
echo "%doc README COPYING AUTHORS" >> _pkg_list
echo "%doc %{_datadir}/man/man1/*" >> _pkg_list
echo "%{_sysconfdir}/init.d/sfcb" >> _pkg_list
echo "%{_localstatedir}/lib/sfcb" >> _pkg_list
echo "%{_bindir}/*" >> _pkg_list
echo "%{_sbindir}/*" >> _pkg_list
-echo "%{_libdir}/*.so*" >> _pkg_list
+echo "%{_libdir}/sfcb/*.so*" >> _pkg_list
echo =======================================
cat _pkg_list
++++++ 0001-uds_auth.patch ++++++
--- /var/tmp/diff_new_pack.O8Du2e/_old 2010-03-11 01:50:43.000000000 +0100
+++ /var/tmp/diff_new_pack.O8Du2e/_new 2010-03-11 01:50:43.000000000 +0100
@@ -1,25 +1,18 @@
-From 488d9b89c806e41bf0bda9979429d220139eb178 Mon Sep 17 00:00:00 2001
-From: =?utf-8?q?Klaus=20K=C3=A4mpf?=
From 3e294c534ea41e52de361cf9bee2c1570ae9cde7 Mon Sep 17 00:00:00 2001 From: buccella
Date: Fri, 19 Feb 2010 18:49:58 -0500 Subject: [PATCH 1/7] [ 2949454 ] Memory leak in ServerProviderInitInstances()
--- interopServerProvider.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/interopServerProvider.c b/interopServerProvider.c index b056d2f..52ee7f2 100644 --- a/interopServerProvider.c +++ b/interopServerProvider.c @@ -782,6 +782,7 @@ void ServerProviderInitInstances(const CMPIContext * ctx) { CMSetProperty(ci,"SubscriptionRemovalAction",&subRemoval,CMPI_uint16); CMSetProperty(ci,"SubscriptionRemovalTimeInterval",&subRemovalInterval,CMPI_uint32); CBCreateInstance(_broker, ctxLocal, op, ci, &st); + CMRelease(ctxLocal); return; } -- 1.6.4.2 ++++++ 10002-2950773-Leak-in-indCIMXMLHandler.c.patch ++++++
From 8892b17b72e70306100a114580c4915ab7a2c4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?=
Date: Mon, 8 Mar 2010 16:35:01 +0100 Subject: [PATCH 2/7] [2950773] Leak in indCIMXMLHandler.c
Conflicts: ChangeLog NEWS indCIMXMLHandler.c --- indCIMXMLHandler.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index 5e707d9..4fc8bea 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -581,8 +581,9 @@ void * retryExport (void * lctx) } // Queue went dry, cleanup and exit pthread_mutex_unlock(&RQlock); - retryRunning=0; - return(NULL); + retryRunning = 0; + ctx->ft->release(ctx); + return (NULL); } CMPIStatus IndCIMXMLHandlerInvokeMethod(CMPIMethodMI * mi, -- 1.6.4.2 ++++++ 10005-2952912-resultSockets-variable-is-not-used-threadsaf.patch ++++++
From 3e285c2bca8aa1f9228fdd2193a0e150a196be4b Mon Sep 17 00:00:00 2001 From: kkaempf
Date: Mon, 8 Mar 2010 21:27:34 +0100 Subject: [PATCH 5/7] 2952912 resultSockets variable is not used threadsafe
---
package/sblim-sfcb.changes | 12 +++++++---
providerMgr.c | 51 ++++++++++++++++++++++++++++++-------------
2 files changed, 43 insertions(+), 20 deletions(-)
diff --git a/providerMgr.c b/providerMgr.c
index c031094..c0a672d 100644
--- a/providerMgr.c
+++ b/providerMgr.c
@@ -23,6 +23,7 @@
#include
From b5064812358cd269cbc8e161c87bd13aa39cfab5 Mon Sep 17 00:00:00 2001 From: kkaempf
Date: Mon, 8 Mar 2010 21:35:47 +0100 Subject: [PATCH 6/7] 2952616 internalProvider is not Threadsafe
--- internalProvider.c | 40 ++++++++++++++++++++++++++-------------- package/sblim-sfcb.changes | 6 ++++-- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/internalProvider.c b/internalProvider.c index b0fdabb..1bfb5ad 100644 --- a/internalProvider.c +++ b/internalProvider.c @@ -90,7 +90,7 @@ static CMPIInstance *instifyBlob(void * blob) { } } -static CMPIInstance* ipGetBlob(const char *ns, const char *cls, char *id, int *len) { +static CMPIInstance* ipGetBlob(const char *ns, const char *cls, const char *id, int *len) { void *blob=getBlob(ns, cls, id, len); return instifyBlob(blob); } @@ -362,7 +362,7 @@ CMPIInstance *internalProviderGetInstance(const CMPIObjectPath * cop, CMPIStatus int len; CMPIString *cn = CMGetClassName(cop, NULL); CMPIString *ns = CMGetNameSpace(cop, NULL); - char *key = normalizeObjectPathChars(cop); + char *key = normalizeObjectPathCharsDup(cop); CMPIInstance *ci=NULL; const char *nss=ns->ft->getCharPtr(ns,NULL); const char *cns=cn->ft->getCharPtr(cn,NULL); @@ -374,6 +374,7 @@ CMPIInstance *internalProviderGetInstance(const CMPIObjectPath * cop, CMPIStatus if (testNameSpace(bnss,rc)==0) { _SFCB_TRACE(1,("--- Invalid namespace %s",nss)); + free(key); _SFCB_RETURN(NULL); } @@ -385,6 +386,7 @@ CMPIInstance *internalProviderGetInstance(const CMPIObjectPath * cop, CMPIStatus } *rc=st; + free(key); _SFCB_RETURN(ci); } @@ -427,7 +429,7 @@ CMPIStatus InternalProviderCreateInstance(CMPIInstanceMI * mi, void *blob; CMPIString *cn = CMGetClassName(cop, NULL); CMPIString *ns = CMGetNameSpace(cop, NULL); - char *key = normalizeObjectPathChars(cop); + char *key = normalizeObjectPathCharsDup(cop); const char *nss=ns->ft->getCharPtr(ns,NULL); const char *cns=cn->ft->getCharPtr(cn,NULL); const char *bnss=repositoryNs(nss); @@ -435,19 +437,22 @@ CMPIStatus InternalProviderCreateInstance(CMPIInstanceMI * mi, _SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderCreateInstance"); if (testNameSpace(bnss,&st)==0) { - return st; + free(key); + _SFCB_RETURN(st); } CMPIConstClass *cc =getConstClass(nss, cns); /* per DSP0004 2.5.2 */ if (cc!=NULL && cc->ft->isAbstract(cc) != 0) { CMPIStatus st = { CMPI_RC_ERR_NOT_SUPPORTED, NULL }; - return st; + free(key); + _SFCB_RETURN(st); } if (existingBlob(bnss,cns,key)) { CMPIStatus st = { CMPI_RC_ERR_ALREADY_EXISTS, NULL }; - return st; + free(key); + _SFCB_RETURN(st); } len=getInstanceSerializedSize(ci); @@ -458,7 +463,8 @@ CMPIStatus InternalProviderCreateInstance(CMPIInstanceMI * mi, CMPIStatus st = { CMPI_RC_ERR_FAILED, NULL }; st.msg=sfcb_native_new_CMPIString("Unable to write to repository",NULL,0); free(blob); - return st; + free(key); + _SFCB_RETURN(st); } free(blob); @@ -477,7 +483,7 @@ CMPIStatus InternalProviderCreateInstance(CMPIInstanceMI * mi, #endif } } - + free(key); _SFCB_RETURN(st); } @@ -493,7 +499,7 @@ CMPIStatus InternalProviderModifyInstance(CMPIInstanceMI * mi, void *blob; CMPIString *cn = CMGetClassName(cop, NULL); CMPIString *ns = CMGetNameSpace(cop, NULL); - char *key = normalizeObjectPathChars(cop); + char *key = normalizeObjectPathCharsDup(cop); const char *nss=ns->ft->getCharPtr(ns,NULL); const char *cns=cn->ft->getCharPtr(cn,NULL); const char *bnss=repositoryNs(nss); @@ -502,12 +508,14 @@ CMPIStatus InternalProviderModifyInstance(CMPIInstanceMI * mi, _SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderSetInstance"); if (testNameSpace(bnss,&st)==0) { - return st; + free(key); + _SFCB_RETURN(st); } if (existingBlob(bnss,cns,key)==0) { CMPIStatus st = { CMPI_RC_ERR_NOT_FOUND, NULL }; - return st; + free(key); + _SFCB_RETURN(st); } if(properties) { @@ -537,6 +545,7 @@ CMPIStatus InternalProviderModifyInstance(CMPIInstanceMI * mi, } } + free(key); _SFCB_RETURN(st); } @@ -548,7 +557,7 @@ CMPIStatus InternalProviderDeleteInstance(CMPIInstanceMI * mi, CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIString *cn = CMGetClassName(cop, NULL); CMPIString *ns = CMGetNameSpace(cop, NULL); - char *key = normalizeObjectPathChars(cop); + char *key = normalizeObjectPathCharsDup(cop); const char *nss=ns->ft->getCharPtr(ns,NULL); const char *cns=cn->ft->getCharPtr(cn,NULL); const char *bnss=repositoryNs(nss); @@ -556,12 +565,14 @@ CMPIStatus InternalProviderDeleteInstance(CMPIInstanceMI * mi, _SFCB_ENTER(TRACE_INTERNALPROVIDER, "InternalProviderDeleteInstance"); if (testNameSpace(bnss,&st)==0) { - return st; + free(key); + _SFCB_RETURN(st); } if (existingBlob(bnss,cns,key)==0) { CMPIStatus st = { CMPI_RC_ERR_NOT_FOUND, NULL }; - return st; + free(key); + _SFCB_RETURN(st); } deleteBlob(bnss,cns,key); @@ -572,6 +583,7 @@ CMPIStatus InternalProviderDeleteInstance(CMPIInstanceMI * mi, } #endif + free(key); _SFCB_RETURN(st); } -- 1.6.4.2 ++++++ 10007-2948647-getObjectPath-may-dereference-NULL-pointer.patch ++++++
From dbdf3dae95dfc60c03347f37e0f4eaa47a339e5e Mon Sep 17 00:00:00 2001 From: kkaempf
Date: Mon, 8 Mar 2010 21:44:27 +0100 Subject: [PATCH 7/7] 2948647 getObjectPath may dereference NULL pointer
--- args.c | 3 +-- array.c | 3 +-- constClass.c | 3 +-- instance.c | 3 +-- internalProvider.c | 3 +-- objectpath.c | 14 ++++++-------- package/sblim-sfcb.changes | 3 +++ 7 files changed, 14 insertions(+), 18 deletions(-) diff --git a/args.c b/args.c index 2c706b8..f8c9cc5 100644 --- a/args.c +++ b/args.c @@ -137,9 +137,8 @@ static CMPIData __aft_getArgAt(const CMPIArgs * args, rv.type = CMPI_string; } else if (rv.type == CMPI_ref) { - char *msg; rv.value.ref = getObjectPath( - (char*)ClObjectGetClString(&ca->hdr, (ClString *) & rv.value.chars), &msg); + (char*)ClObjectGetClString(&ca->hdr, (ClString *) & rv.value.chars), NULL); } else if (rv.type & CMPI_ARRAY && rv.value.array) { rv.value.array = diff --git a/array.c b/array.c index be6c875..ff5f2e7 100644 --- a/array.c +++ b/array.c @@ -361,9 +361,8 @@ CMPIArray *internal_native_make_CMPIArray(CMPIData * av, CMPIStatus * rc, arraySetElementNotTrackedAt((CMPIArray *) array, i, (CMPIValue *) chars, CMPI_chars); } else if (av[i + 1].type == CMPI_ref) { CMPIValue value; - char *msg = ""; char *chars = (char *) ClObjectGetClString(hdr, (ClString *) & av[i + 1].value.chars); - value.ref = getObjectPath(chars,&msg); + value.ref = getObjectPath(chars, NULL); arraySetElementNotTrackedAt((CMPIArray *) array, i, &value, CMPI_ref); } else if (av[i + 1].type == CMPI_instance) { value.inst = (void *)ClObjectGetClObject(hdr, (ClString *) & av[i + 1].value.inst); diff --git a/constClass.c b/constClass.c index 0a1f616..effcb07 100644 --- a/constClass.c +++ b/constClass.c @@ -134,10 +134,9 @@ CMPIData getPropertyQualsAt(CMPIConstClass * cc, CMPICount i, CMPIString ** name rv.type = CMPI_string; } else if (rv.type == CMPI_ref) { - char *msg; if ((rv.state & CMPI_nullValue)==0) rv.value.ref = getObjectPath( - (char*)ClObjectGetClString(&cls->hdr,(ClString *) & rv.value.chars), &msg); + (char*)ClObjectGetClString(&cls->hdr,(ClString *) & rv.value.chars), NULL); } if (rv.type & CMPI_ARRAY && rv.value.array) { rv.value.array = diff --git a/instance.c b/instance.c index 1d58b95..8179831 100644 --- a/instance.c +++ b/instance.c @@ -184,9 +184,8 @@ CMPIData __ift_internal_getPropertyAt(const CMPIInstance * ci, CMPICount i, rv.value.string = sfcb_native_new_CMPIString(rv.value.string->hdl, NULL,0); } else if (rv.type == CMPI_ref) { - char *msg; rv.value.ref = getObjectPath( - (char*)ClObjectGetClString(&inst->hdr, (ClString*)&rv.value.chars), &msg); + (char*)ClObjectGetClString(&inst->hdr, (ClString*)&rv.value.chars), NULL); } else if (rv.type & CMPI_ARRAY && rv.value.array) { rv.value.array = diff --git a/internalProvider.c b/internalProvider.c index 1bfb5ad..d6fa09e 100644 --- a/internalProvider.c +++ b/internalProvider.c @@ -210,7 +210,6 @@ CMPIStatus InternalProviderEnumInstanceNames(CMPIInstanceMI * mi, int i,ac=0; char copKey[8192]=""; char *kp; - char *msg; CMPIArgs *in,*out; CMPIObjectPath *op; CMPIArray *ar; @@ -237,7 +236,7 @@ CMPIStatus InternalProviderEnumInstanceNames(CMPIInstanceMI * mi, strcat(copKey,"."); strncat(copKey,kp,ekl); - cop=getObjectPath(copKey,&msg); + cop = getObjectPath(copKey,NULL); if (cop) CMReturnObjectPath(rslt, cop); else { CMPIStatus st = { CMPI_RC_ERR_FAILED, NULL }; diff --git a/objectpath.c b/objectpath.c index ce23627..0d634e5 100644 --- a/objectpath.c +++ b/objectpath.c @@ -159,9 +159,8 @@ CMPIData opGetKeyCharsAt(const CMPIObjectPath * op, rv.type = CMPI_string; } else if (rv.type == CMPI_ref) { - char *msg=""; rv.value.ref = getObjectPath( - (char*)ClObjectGetClString(&cop->hdr, (ClString *) & rv.value.chars), &msg); + (char*)ClObjectGetClString(&cop->hdr, (ClString *) & rv.value.chars), NULL); } else if (rv.type & CMPI_ARRAY && rv.value.array) { // should nor occcur rv.value.array = @@ -513,8 +512,7 @@ static void addKey(CMPIObjectPath * op, char *kd, int ref) *val = 0; val++; if (ref) { - char * msg; - CMPIObjectPath *keyOp = getObjectPath(val,&msg); + CMPIObjectPath *keyOp = getObjectPath(val, NULL); op->ft->addKey(op, kd, (CMPIValue*)&keyOp, CMPI_ref); } else if (*val == '"') { val++; @@ -564,7 +562,7 @@ CMPIObjectPath *getObjectPath(char *path, char **msg) if (nname) free(nname); return op; } - *msg = "No className found"; + if (msg) *msg = "No className found"; free(origu); if (nname) free(nname); return NULL; @@ -597,19 +595,19 @@ CMPIObjectPath *getObjectPath(char *path, char **msg) break; if (*p == '"') { if (*(p - 1) != '=') { - *msg = "Incorrectly quoted string 1"; + if (msg) *msg = "Incorrectly quoted string 1"; free(origu); return NULL; } p++; if ((p = strchr(p, '"')) == NULL) { - *msg = "Unbalanced quoted string"; + if (msg) *msg = "Unbalanced quoted string"; free(origu); return NULL; } p++; if (*p != ',' && *p != 0) { - *msg = "Incorrectly quoted string 2"; + if (msg) *msg = "Incorrectly quoted string 2"; free(origu); return NULL; } -- 1.6.4.2 ++++++ 10008-2967257-prefer-CMPI_chars-over-CMPI_classNameString.patch ++++++
From d49134363d316f72da151a7750f3b507002a3654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?=
Date: Wed, 10 Mar 2010 21:05:13 +0100 Subject: [PATCH] 2967257 prefer CMPI_chars over CMPI_classNameString
--- value.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/value.c b/value.c index 17f681a..93e9149 100644 --- a/value.c +++ b/value.c @@ -185,12 +185,19 @@ char *sfcb_value2Chars(CMPIType type, CMPIValue * value) case CMPI_filter: break; - + + case CMPI_chars: + if (value->chars) { + size = strlen((char *) value->chars); + p = malloc(size + 3); + sprintf(p, "\"%s\"", (char *) value->chars); + return p; + } + break; case CMPI_string: case CMPI_numericString: case CMPI_booleanString: case CMPI_dateTimeString: - case CMPI_classNameString: if (value->string->hdl) { size = strlen((char *) value->string->hdl); p = malloc(size + 8); -- 1.6.4.2 ++++++ sblim-sfcb-1.3.2.tar.bz2 -> sblim-sfcb-1.3.7.tar.bz2 ++++++ ++++ 157615 lines of diff (skipped) ++++++ sblim-sfcb-rpmlintrc ++++++ addFilter("devel-file-in-non-devel-package .*/sfcb/.*\.so") ++++++ sfcb-pam.conf ++++++ --- /var/tmp/diff_new_pack.O8Du2e/_old 2010-03-11 01:50:44.000000000 +0100 +++ /var/tmp/diff_new_pack.O8Du2e/_new 2010-03-11 01:50:44.000000000 +0100 @@ -1,5 +1,5 @@ # Sample PAM Configuration for Small Footprint CIM Broker -auth required pam_succeed_if.so user ingroup sfcb +auth required pam_succeed_if.so quiet_success user ingroup sfcb auth required pam_localuser.so auth include common-auth account include common-account ++++++ susefirewall.conf ++++++ # SuSEfirewall2 service definition ## Name: sblim-sfcb CIMOM ## Description: Small footprint CIM broker # space separated list of allowed TCP ports TCP="5988 5989" UDP="5988 5989" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org