You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(45) |
Apr
(150) |
May
(145) |
Jun
(150) |
Jul
(79) |
Aug
(313) |
Sep
(160) |
Oct
(309) |
Nov
(115) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(160) |
Feb
(144) |
Mar
(127) |
Apr
(48) |
May
(102) |
Jun
(54) |
Jul
(245) |
Aug
(94) |
Sep
(152) |
Oct
(162) |
Nov
(166) |
Dec
(740) |
2007 |
Jan
(752) |
Feb
(437) |
Mar
(328) |
Apr
(373) |
May
(569) |
Jun
(399) |
Jul
(369) |
Aug
(627) |
Sep
(100) |
Oct
(306) |
Nov
(166) |
Dec
(282) |
2008 |
Jan
(68) |
Feb
(145) |
Mar
(180) |
Apr
(160) |
May
(277) |
Jun
(229) |
Jul
(1188) |
Aug
(51) |
Sep
(97) |
Oct
(99) |
Nov
(95) |
Dec
(170) |
2009 |
Jan
(39) |
Feb
(73) |
Mar
(120) |
Apr
(121) |
May
(104) |
Jun
(262) |
Jul
(57) |
Aug
(171) |
Sep
(131) |
Oct
(88) |
Nov
(64) |
Dec
(83) |
2010 |
Jan
(55) |
Feb
(67) |
Mar
(124) |
Apr
(64) |
May
(130) |
Jun
(75) |
Jul
(164) |
Aug
(64) |
Sep
(44) |
Oct
(17) |
Nov
(43) |
Dec
(31) |
2011 |
Jan
(21) |
Feb
(10) |
Mar
(43) |
Apr
(46) |
May
(52) |
Jun
(71) |
Jul
(7) |
Aug
(16) |
Sep
(51) |
Oct
(14) |
Nov
(33) |
Dec
(15) |
2012 |
Jan
(12) |
Feb
(61) |
Mar
(129) |
Apr
(76) |
May
(70) |
Jun
(52) |
Jul
(29) |
Aug
(41) |
Sep
(32) |
Oct
(23) |
Nov
(38) |
Dec
(26) |
2013 |
Jan
(35) |
Feb
(37) |
Mar
(51) |
Apr
(15) |
May
(52) |
Jun
(15) |
Jul
(23) |
Aug
(21) |
Sep
(46) |
Oct
(69) |
Nov
(57) |
Dec
(26) |
2014 |
Jan
(5) |
Feb
(13) |
Mar
(17) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Dave B. <bla...@us...> - 2011-06-20 23:28:58
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http In directory vz-cvs-3.sog:/tmp/cvs-serv21778/src/org/sblim/cimclient/internal/http Modified Files: Tag: Experimental HttpClient.java Log Message: 3323310 - Need the ability to override certain Global Properties Index: HttpClient.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/http/HttpClient.java,v retrieving revision 1.12.2.24 retrieving revision 1.12.2.25 diff -u -d -r1.12.2.24 -r1.12.2.25 --- HttpClient.java 23 Mar 2011 15:48:08 -0000 1.12.2.24 +++ HttpClient.java 20 Jun 2011 23:28:56 -0000 1.12.2.25 @@ -58,6 +58,7 @@ * 3046073 2010-09-07 blaschke-oss Performance hit due to socket conn. creation with timeout * 3195069 2011-02-28 blaschke-oss Need support to disable SSL Handshake * 3235440 2011-03-22 blaschke-oss NullPointerException when socket factory returns null + * 3323310 2011-06-20 blaschke-oss Need the ability to override certain Global Properties */ package org.sblim.cimclient.internal.http; @@ -97,7 +98,6 @@ import org.sblim.cimclient.internal.http.io.PersistentInputStream; import org.sblim.cimclient.internal.logging.LogAndTraceBroker; import org.sblim.cimclient.internal.logging.Messages; -import org.sblim.cimclient.internal.util.WBEMConfiguration; import org.sblim.cimclient.internal.util.WBEMConstants; /** @@ -958,7 +958,7 @@ if (this.iSocket == null) { // Determine whether we need to connect with a timeout or not - boolean socketConnectWithTimeout = WBEMConfiguration.getGlobalConfiguration() + boolean socketConnectWithTimeout = this.iHttpClientPool.getConfigurationContext() .socketConnectWithTimeout(); logger.trace(Level.FINER, "Socket=null, creating http socket " + (socketConnectWithTimeout ? "with" : "without") + " timeout."); @@ -1033,7 +1033,7 @@ // Determine whether we need to perform synchronized SSL // handshake or not - boolean synchronizedHandshake = WBEMConfiguration.getGlobalConfiguration() + boolean synchronizedHandshake = this.iHttpClientPool.getConfigurationContext() .synchronizedSslHandshake(); logger.trace(Level.FINER, "Starting " + (synchronizedHandshake ? "synchronized" : "unsynchronized") |
From: Chris B. <buc...@us...> - 2011-06-20 21:35:58
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv3135 Modified Files: configure.ac Log Message: removed errant '+' Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- configure.ac 8 Jun 2011 22:00:12 -0000 1.119 +++ configure.ac 20 Jun 2011 21:35:55 -0000 1.120 @@ -206,7 +206,7 @@ fi fi if test "$enable_tests" != ""; then -+ enable_settableretry="yes" + enable_settableretry="yes" fi |
From: Dave B. <bla...@us...> - 2011-06-15 11:40:14
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv24479 Modified Files: Tag: CIM_CLIENT_2_1_9_M build.xml sblim-cim-client2.spec Log Message: 2.1.9 release work Index: sblim-cim-client2.spec =================================================================== RCS file: /cvsroot/sblim/jsr48-client/sblim-cim-client2.spec,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -u -d -r1.22 -r1.22.2.1 --- sblim-cim-client2.spec 15 Jun 2011 11:12:06 -0000 1.22 +++ sblim-cim-client2.spec 15 Jun 2011 11:40:12 -0000 1.22.2.1 @@ -1,7 +1,7 @@ %define name sblim-cim-client2 %define project_folder %{name}-%{version}-src %define archive_folder build -%define version HEAD +%define version 2.1.9 %define release 1jpp %define section free Index: build.xml =================================================================== RCS file: /cvsroot/sblim/jsr48-client/build.xml,v retrieving revision 1.43 retrieving revision 1.43.4.1 diff -u -d -r1.43 -r1.43.4.1 --- build.xml 15 Feb 2011 12:42:35 -0000 1.43 +++ build.xml 15 Jun 2011 11:40:12 -0000 1.43.4.1 @@ -36,7 +36,7 @@ <property name="Manifest.name" value="SBLIM CIM Client for Java" /> <property name="Manifest.title" value="SBLIM CIM Client for Java" /> <property name="Manifest.vendor" value="IBM Corporation 2005, 2011" /> - <property name="Manifest.version" value="HEAD" /> + <property name="Manifest.version" value="2.1.9" /> <property name="Directory.source.core" value="${basedir}/src" /> <property name="Directory.source.samples" value="${basedir}/smpl" /> |
From: Dave B. <bla...@us...> - 2011-06-15 11:12:09
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv20189 Modified Files: ChangeLog sblim-cim-client2.spec NEWS Log Message: 2.1.9 release work Index: sblim-cim-client2.spec =================================================================== RCS file: /cvsroot/sblim/jsr48-client/sblim-cim-client2.spec,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- sblim-cim-client2.spec 15 Mar 2011 10:00:38 -0000 1.21 +++ sblim-cim-client2.spec 15 Jun 2011 11:12:06 -0000 1.22 @@ -158,6 +158,21 @@ # ----------------------------------------------------------------------------- %changelog +* Wed Jun 15 2011 Dave Blaschke <bla...@us...> +- New release 2.1.9 + o 3311279 Repeated Instantiation of SAXParserFactory + o 3304953 Indication URL mapped to lower case + o 3304058 Use same date format in change history + o 3288721 Need the function of indication reordering + o 3206904 Indication listener deadlock causes JVM to run out sockets + o 3297028 Instances contain CIMClassProperty with DOM parser + o 3293248 Support for CIM_ERROR instances within ERROR + o 3281781 fail to parse Embedded Instance parameter + o 3277928 CIM-XML tracing cannot be enabled in the field + o 3267429 Samples should close client + o 3252669 setXmlTraceStream blindly closes previous stream + o 3235440 NullPointerException when socket factory returns null + * Tue Mar 15 2011 Dave Blaschke <bla...@us...> - New release 2.1.8 o 3197423 Server authentication with PegasusLocalAuthInfo failing Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.228 retrieving revision 1.229 diff -u -d -r1.228 -r1.229 --- NEWS 14 Jun 2011 13:33:49 -0000 1.228 +++ NEWS 15 Jun 2011 11:12:06 -0000 1.229 @@ -1,4 +1,4 @@ -Changes in HEAD +Version 2.1.9 ================ 3311279 Repeated Instantiation of SAXParserFactory 3304953 Indication URL mapped to lower case Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/jsr48-client/ChangeLog,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ChangeLog 15 Mar 2011 10:00:38 -0000 1.20 +++ ChangeLog 15 Jun 2011 11:12:06 -0000 1.21 @@ -1,3 +1,114 @@ +Release 2.1.9 +============= + +Tue Jun 14 08:33:49 CDT 2011 blaschke-oss + + 3311279 Repeated Instantiation of SAXParserFactory + + CloseableIteratorSAX.java 1.15 + NEWS 1.228 + +Sat Jun 04 05:33:10 CDT 2011 blaschke-oss + + 3304953 Indication URL mapped to lower case + + CIMIndicationHandler.java 1.22 + NEWS 1.227 + +Sat Jun 04 05:14:26 CDT 2011 blaschke-oss + + 3304058 Use same date format in change history + + CIMIndicationHandler.java 1.21 + XMLPullParser.java 1.23 + ChunkedInputStream.java 1.11 + MessageWriter.java 1.8 + HttpHeader.java 1.11 + CIMXMLBuilderImpl.java 1.34 + NEWS 1.226 + +Sat Jun 04 04:53:05 CDT 2011 blaschke-oss + + 3288721 Need the function of indication reordering + + ReliableIndicationHandler.java 1.2 + CIMIndicationHandler.java 1.20 + WBEMConfigurationProperties.java 1.39 + sblim-cim-client2.properties 1.22 + NEWS 1.225 + +Tue May 31 11:29:06 CDT 2011 blaschke-oss + + 3206904 Indication listener deadlock causes JVM to run out sockets + + WBEMConfigurationDefaults.java 1.26 + WBEMConfiguration.java 1.37 + ThreadPool.java 1.13 + HttpServerConnection.java 1.15 + WBEMConfigurationProperties.java 1.38 + sblim-cim-client2.properties 1.21 + NEWS 1.224 + +Tue May 31 09:23:12 CDT 2011 blaschke-oss + + 3297028 Instances contain CIMClassProperty with DOM parser + + CIMXMLParserImpl.java 1.42 + NEWS 1.223 + +Tue May 31 09:06:47 CDT 2011 blaschke-oss + + 3293248 Support for CIM_ERROR instances within ERROR + + CIMXMLParserImpl.java 1.41 + enumerateClassesError.xml 1.2 + EnumClasses.java 1.12 + CloseableIteratorTest.java 1.7 + ErrorNode.java 1.9 + unittest.html 1.12 + NEWS 1.222 + +Tue May 10 15:24:27 CDT 2011 blaschke-oss + + 3281781 fail to parse Embedded Instance parameter + + EmbObjHandler.java 1.12 + NEWS 1.221 + +Tue May 10 15:13:07 CDT 2011 blaschke-oss + + 3277928 CIM-XML tracing cannot be enabled in the field + + WBEMClientCIMXML.java 1.64 + WBEMConfiguration.java 1.36 + WBEMConfigurationProperties.java 1.37 + sblim-cim-client2.properties 1.20 + NEWS 1.220 + +Tue May 10 14:25:24 CDT 2011 blaschke-oss + + 3267429 Samples should close client + + Jsr48PullEnumSample.java 1.4 + Jsr48PegasusIndicationSample.java 1.4 + Jsr48OperationSample.java 1.12 + Jsr48IndicationSample.java 1.12 + NEWS 1.219 + +Tue May 10 14:12:01 CDT 2011 blaschke-oss + + 3252669 setXmlTraceStream blindly closes previous stream + + LogAndTraceBroker.java 1.21 + NEWS 1.218 + +Mon Apr 11 13:12:23 CDT 2011 blaschke-oss + + 3235440 NullPointerException when socket factory returns null + + HttpClient.java 1.35 + NEWS 1.217 + Release 2.1.8 ============= |
From: Dave B. <bla...@us...> - 2011-06-14 13:33:52
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv29784/src/org/sblim/cimclient/internal/wbem Modified Files: CloseableIteratorSAX.java Log Message: 3311279 - Repeated Instantiation of SAXParserFactory Index: CloseableIteratorSAX.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/CloseableIteratorSAX.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- CloseableIteratorSAX.java 14 Sep 2009 15:47:09 -0000 1.14 +++ CloseableIteratorSAX.java 14 Jun 2011 13:33:49 -0000 1.15 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -20,6 +20,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 2845211 2009-08-27 raman_arora Pull Enumeration Feature (SAX Parser) + * 3311279 2011-06-04 blaschke-oss Repeated Instantiation of SAXParserFactory */ package org.sblim.cimclient.internal.wbem; @@ -57,6 +58,8 @@ private CIMArgument<?>[] iCIMArgAL; + private static SAXParserFactory iFactory = SAXParserFactory.newInstance(); + /** * Ctor. * @@ -70,8 +73,7 @@ public CloseableIteratorSAX(InputStreamReader pStream, CIMObjectPath pPath) throws IOException, SAXException, ParserConfigurationException, WBEMException { XMLDefaultHandlerImpl handler = new XMLDefaultHandlerImpl(pPath); - SAXParserFactory factory = SAXParserFactory.newInstance(); - SAXParser saxParser = factory.newSAXParser(); + SAXParser saxParser = iFactory.newSAXParser(); try { saxParser.parse(new InputSource(pStream), handler); } catch (TrailerException e) { |
From: Chris B. <buc...@us...> - 2011-06-10 19:58:50
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5352 Modified Files: control.c ChangeLog NEWS contributions.txt Log Message: [ 3165732 ] Add ability for client library to specify configuration file Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.588 retrieving revision 1.589 diff -u -d -r1.588 -r1.589 --- NEWS 10 Jun 2011 17:57:45 -0000 1.588 +++ NEWS 10 Jun 2011 19:58:47 -0000 1.589 @@ -16,6 +16,7 @@ - 3314383 Memory leak in CimResource_Enumerate_EP - 3047562 [patch] Create bzip2 tarballs on "make dist" - 3314762 Memory leak in method invoke using SFCB local interface +- 3165732 Add ability for client library to specify configuration file Changes in 1.3.11 ================= Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- control.c 9 Jun 2011 22:39:02 -0000 1.36 +++ control.c 10 Jun 2011 19:58:47 -0000 1.37 @@ -150,6 +150,7 @@ char fin[1024], *stmt = NULL; int i, m, n=0, err=0; CntlVals rv; + char *configFile; if (ct) return 0; @@ -162,12 +163,19 @@ } if (fn) { - strcpy(fin,fn); + if (strlen(fn) >= sizeof(fin)) + mlogf(M_ERROR,M_SHOW, "--- \"%s\" too long\n", fn); + strncpy(fin,fn,sizeof(fin)); } + else if ((configFile = getenv("SFCB_CONFIG_FILE")) != NULL && configFile[0] != '\0') { + if (strlen(configFile) >= sizeof(fin)) + mlogf(M_ERROR,M_SHOW, "--- \"%s\" too long\n", configFile); + strncpy(fin,configFile,sizeof(fin)); + } else { - strcpy(fin, SFCB_CONFDIR); - strcat(fin, "/sfcb.cfg"); + strncpy(fin, SFCB_CONFDIR "/sfcb.cfg", sizeof(fin)); } + fin[sizeof(fin)-1] = '\0'; if (fin[0]=='/') mlogf(M_INFO,M_SHOW,"--- Using %s\n",fin); else mlogf(M_INFO,M_SHOW,"--- Using ./%s\n",fin); Index: contributions.txt =================================================================== RCS file: /cvsroot/sblim/sfcb/contributions.txt,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- contributions.txt 10 Jun 2011 17:57:45 -0000 1.65 +++ contributions.txt 10 Jun 2011 19:58:47 -0000 1.66 @@ -187,3 +187,4 @@ Josef Moellers -------------- 11/17/2010 [ 3109469 ] Potential Buffer Overflow in msgqueue.c:localConnectServer() +06/10/2010 [ 3165732 ] Add ability for client library to specify configuration file Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.662 retrieving revision 1.663 diff -u -d -r1.662 -r1.663 --- ChangeLog 10 Jun 2011 17:57:45 -0000 1.662 +++ ChangeLog 10 Jun 2011 19:58:47 -0000 1.663 @@ -4,6 +4,10 @@ [ 3314762 ] Memory leak in method invoke using SFCB local interface (patch by Chris Poblete) + * control.c: + [ 3165732 ] Add ability for client library to specify configuration file + (patch by Josef Moellers) + 2011-06-09 Chris Buccella <buc...@li...> * control.c, cimcClientSfcbLocal.c: |
From: Chris B. <buc...@us...> - 2011-06-10 19:57:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via a113b68040c7627af055bf744c3725a22a7dcd55 (commit) from 7c7b0ec227317272e0891c7da4bbef39eedc93d5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a113b68040c7627af055bf744c3725a22a7dcd55 Author: buccella <buc...@li...> Date: Fri Jun 10 15:58:43 2011 -0400 [ 3165732 ] Add ability for client library to specify configuration file ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 5f5574c..4f87f68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ [ 3314762 ] Memory leak in method invoke using SFCB local interface (patch by Chris Poblete) + * control.c: + [ 3165732 ] Add ability for client library to specify configuration file + (patch by Josef Moellers) + 2011-06-09 Chris Buccella <buc...@li...> * control.c, cimcClientSfcbLocal.c: diff --git a/NEWS b/NEWS index d9032c8..9384213 100644 --- a/NEWS +++ b/NEWS @@ -88,6 +88,7 @@ Bugs Fixed: - 3314383 Memory leak in CimResource_Enumerate_EP - 3047562 [patch] Create bzip2 tarballs on "make dist" - 3314762 Memory leak in method invoke using SFCB local interface +- 3165732 Add ability for client library to specify configuration file Changes in 1.3.11 ================= diff --git a/contributions.txt b/contributions.txt index 65234ae..5e2383d 100644 --- a/contributions.txt +++ b/contributions.txt @@ -190,3 +190,4 @@ Chris Poblete, Dell Josef Moellers -------------- 11/17/2010 [ 3109469 ] Potential Buffer Overflow in msgqueue.c:localConnectServer() +06/10/2011 [ 3165732 ] Add ability for client library to specify configuration file diff --git a/control.c b/control.c index debfba8..e39a246 100644 --- a/control.c +++ b/control.c @@ -152,6 +152,7 @@ setupControl(char *fn) n = 0, err = 0; CntlVals rv; + char *configFile; if (ct) return 0; @@ -164,11 +165,18 @@ setupControl(char *fn) } if (fn) { - strcpy(fin, fn); + if (strlen(fn) >= sizeof(fin)) + mlogf(M_ERROR,M_SHOW, "--- \"%s\" too long\n", fn); + strncpy(fin,fn,sizeof(fin)); + } + else if ((configFile = getenv("SFCB_CONFIG_FILE")) != NULL && configFile[0] != '\0') { + if (strlen(configFile) >= sizeof(fin)) + mlogf(M_ERROR,M_SHOW, "--- \"%s\" too long\n", configFile); + strncpy(fin,configFile,sizeof(fin)); } else { - strcpy(fin, SFCB_CONFDIR); - strcat(fin, "/sfcb.cfg"); + strncpy(fin, SFCB_CONFDIR "/sfcb.cfg", sizeof(fin)); } + fin[sizeof(fin)-1] = '\0'; if (fin[0] == '/') mlogf(M_INFO, M_SHOW, "--- Using %s\n", fin); hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2011-06-10 17:57:48
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv24363 Modified Files: cimcClientSfcbLocal.c ChangeLog NEWS contributions.txt Log Message: [ 3314762 ] Memory leak in method invoke using SFCB local interface Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.587 retrieving revision 1.588 diff -u -d -r1.587 -r1.588 --- NEWS 9 Jun 2011 23:10:10 -0000 1.587 +++ NEWS 10 Jun 2011 17:57:45 -0000 1.588 @@ -14,7 +14,8 @@ - 3287789 interopServerProvider not conservative when answering reqs - 3296541 CIM_IndicationSubscription corrupts after delilvery fails - 3314383 Memory leak in CimResource_Enumerate_EP --3047562 [patch] Create bzip2 tarballs on "make dist" +- 3047562 [patch] Create bzip2 tarballs on "make dist" +- 3314762 Memory leak in method invoke using SFCB local interface Changes in 1.3.11 ================= Index: cimcClientSfcbLocal.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimcClientSfcbLocal.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- cimcClientSfcbLocal.c 9 Jun 2011 22:39:02 -0000 1.41 +++ cimcClientSfcbLocal.c 10 Jun 2011 17:57:45 -0000 1.42 @@ -1453,9 +1453,14 @@ memset(&binCtx,0,sizeof(BinRequestContext)); - argsin = convertFromStringArguments(getClass(mb, cop, 0, NULL, rc), + CMPIConstClass *tcls = getClass(mb, cop, 0, NULL, rc); + + argsin = convertFromStringArguments(tcls, method, in, rc); + CMRelease(tcls); + tcls = NULL; + if(rc && rc->rc == CMPI_RC_OK) { sreq.objectPath = setObjectPathMsgSegment(cop); sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); Index: contributions.txt =================================================================== RCS file: /cvsroot/sblim/sfcb/contributions.txt,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- contributions.txt 9 Jun 2011 23:10:10 -0000 1.64 +++ contributions.txt 10 Jun 2011 17:57:45 -0000 1.65 @@ -181,7 +181,8 @@ 11/10/2010 [ 3101154 ] Daemon clients failed SfcbLocal connect due to permission 03/08/2011 [ 3202420 ] CDATA value in a string property is improperly XML escaped 04/28/2011 [ 3202466 ] Single item on method param of array type rejected via Local -06/09/2011 [ 3314383 Memory leak in CimResource_Enumerate_EP +06/09/2011 [ 3314383 ] Memory leak in CimResource_Enumerate_EP +06/10/2011 [ 3314762 ] Memory leak in method invoke using SFCB local interface Josef Moellers -------------- Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.661 retrieving revision 1.662 diff -u -d -r1.661 -r1.662 --- ChangeLog 9 Jun 2011 23:10:10 -0000 1.661 +++ ChangeLog 10 Jun 2011 17:57:45 -0000 1.662 @@ -1,3 +1,9 @@ +2011-06-10 Chris Buccella <buc...@li...> + + * cimcClientSfcbLocal.c: + [ 3314762 ] Memory leak in method invoke using SFCB local interface + (patch by Chris Poblete) + 2011-06-09 Chris Buccella <buc...@li...> * control.c, cimcClientSfcbLocal.c: |
From: Chris B. <buc...@us...> - 2011-06-10 17:57:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 7c7b0ec227317272e0891c7da4bbef39eedc93d5 (commit) from 89cfb4c335a4d3ea77979964c7c93dd201b18866 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7c7b0ec227317272e0891c7da4bbef39eedc93d5 Author: buccella <buc...@li...> Date: Fri Jun 10 13:58:25 2011 -0400 [ 3314762 ] Memory leak in method invoke using SFCB local interface ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index db6cac7..5f5574c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-06-10 Chris Buccella <buc...@li...> + + * cimcClientSfcbLocal.c: + [ 3314762 ] Memory leak in method invoke using SFCB local interface + (patch by Chris Poblete) + 2011-06-09 Chris Buccella <buc...@li...> * control.c, cimcClientSfcbLocal.c: diff --git a/NEWS b/NEWS index 1e3f1be..d9032c8 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,7 @@ Bugs Fixed: - 3202466 Single item on method param of array type rejected via Local - 3314383 Memory leak in CimResource_Enumerate_EP - 3047562 [patch] Create bzip2 tarballs on "make dist" +- 3314762 Memory leak in method invoke using SFCB local interface Changes in 1.3.11 ================= diff --git a/cimcClientSfcbLocal.c b/cimcClientSfcbLocal.c index f4bd7fa..ba7f17e 100644 --- a/cimcClientSfcbLocal.c +++ b/cimcClientSfcbLocal.c @@ -1480,8 +1480,10 @@ invokeMethod(Client * mb, memset(&binCtx, 0, sizeof(BinRequestContext)); - argsin = convertFromStringArguments(getClass(mb, cop, 0, NULL, rc), - method, in, rc); + CMPIConstClass *tcls = getClass(mb, cop, 0, NULL, rc); + argsin = convertFromStringArguments(tcls, method, in, rc); + CMRelease(tcls); + tcls = NULL; if(rc && rc->rc == CMPI_RC_OK) { sreq.objectPath = setObjectPathMsgSegment(cop); diff --git a/contributions.txt b/contributions.txt index ddd57e3..65234ae 100644 --- a/contributions.txt +++ b/contributions.txt @@ -185,6 +185,7 @@ Chris Poblete, Dell 03/09/2011 [ 3202420 ] CDATA value in a string property is improperly XML escaped 04/28/2011 [ 3202466 ] Single item on method param of array type rejected via Local 06/09/2011 [ 3314383 ] Memory leak in CimResource_Enumerate_EP +06/10/2011 [ 3314762 ] Memory leak in method invoke using SFCB local interface Josef Moellers -------------- hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2011-06-09 23:10:13
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv22511 Modified Files: Makefile.am ChangeLog NEWS contributions.txt Log Message: [ 3047562 ] [patch] Create bzip2 tarballs on "make dist" Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.586 retrieving revision 1.587 diff -u -d -r1.586 -r1.587 --- NEWS 9 Jun 2011 22:39:02 -0000 1.586 +++ NEWS 9 Jun 2011 23:10:10 -0000 1.587 @@ -14,6 +14,7 @@ - 3287789 interopServerProvider not conservative when answering reqs - 3296541 CIM_IndicationSubscription corrupts after delilvery fails - 3314383 Memory leak in CimResource_Enumerate_EP +-3047562 [patch] Create bzip2 tarballs on "make dist" Changes in 1.3.11 ================= Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 --- Makefile.am 29 Apr 2011 21:40:50 -0000 1.110 +++ Makefile.am 9 Jun 2011 23:10:10 -0000 1.111 @@ -21,6 +21,8 @@ # # +AUTOMAKE_OPTIONS = no-dist-gzip dist-bzip2 + sfcbdocdir=$(datadir)/doc/sfcb-$(VERSION) sfcbdatadir=$(datadir)/sfcb sfcbconfdir=$(sysconfdir)/sfcb Index: contributions.txt =================================================================== RCS file: /cvsroot/sblim/sfcb/contributions.txt,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- contributions.txt 9 Jun 2011 22:39:02 -0000 1.63 +++ contributions.txt 9 Jun 2011 23:10:10 -0000 1.64 @@ -112,6 +112,7 @@ 05/27/2010 [ 2994737 ] cimslp fails to get sslCertificateFilePath config value 05/27/2010 [ 2984485 ] Possible access to freed memory in cimslpSLP.c 06/30/2010 [ 2968599 ] Wrong trace msg for invokeMethod (local interface) +06/09/2011 [ 3047562 ] [patch] Create bzip2 tarballs on "make dist" Mike Brasher, Inova ------------------- Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.660 retrieving revision 1.661 diff -u -d -r1.660 -r1.661 --- ChangeLog 9 Jun 2011 22:39:02 -0000 1.660 +++ ChangeLog 9 Jun 2011 23:10:10 -0000 1.661 @@ -1,9 +1,13 @@ 2011-06-09 Chris Buccella <buc...@li...> * control.c, cimcClientSfcbLocal.c: - [ 3314383 Memory leak in CimResource_Enumerate_EP + [ 3314383 ] Memory leak in CimResource_Enumerate_EP (patch by Chris Poblete) + * Makefile.am + [ 3047562 ] [patch] Create bzip2 tarballs on "make dist" + (patch by Klaus Kaempf) + 2011-06-08 Chris Buccella <buc...@li...> * cimAccountPassthroughProvider.c, cimAccountPassthrough.mof, |
From: Chris B. <buc...@us...> - 2011-06-09 22:59:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 89cfb4c335a4d3ea77979964c7c93dd201b18866 (commit) from 10d207a686ec964aa4f5e798cb32264eb3cd9461 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 89cfb4c335a4d3ea77979964c7c93dd201b18866 Author: buccella <buc...@li...> Date: Thu Jun 9 19:00:22 2011 -0400 [ 3047562 ] [patch] Create bzip2 tarballs on "make dist" ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 3d10ba3..db6cac7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ [ 3314383 ] Memory leak in CimResource_Enumerate_EP (patch by Chris Poblete) + * Makefile.am + [ 3047562 ] [patch] Create bzip2 tarballs on "make dist" + (patch by Klaus Kampf) + 2011-06-01 Chris Buccella <buc...@li...> * interopServerProvider.c: diff --git a/Makefile.am b/Makefile.am index 2f3dd61..69cbb1a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,6 +20,7 @@ # Makefile process input for sfcb. # # +AUTOMAKE_OPTIONS = no-dist-gzip dist-bzip2 sfcbdocdir=$(datadir)/doc/sfcb-$(VERSION) sfcbdatadir=$(datadir)/sfcb diff --git a/NEWS b/NEWS index 28b4e5c..1e3f1be 100644 --- a/NEWS +++ b/NEWS @@ -86,6 +86,7 @@ Bugs Fixed: - 3291646 Unused var in __NullEvaluate - 3202466 Single item on method param of array type rejected via Local - 3314383 Memory leak in CimResource_Enumerate_EP +- 3047562 [patch] Create bzip2 tarballs on "make dist" Changes in 1.3.11 ================= diff --git a/contributions.txt b/contributions.txt index 8f38a9f..ddd57e3 100644 --- a/contributions.txt +++ b/contributions.txt @@ -112,6 +112,7 @@ Klaus Kampf, Novell 05/24/2010 [ 2994737 ] cimslp fails to get sslCertificateFilePath config value 05/27/2010 [ 2984485 ] Possible access to freed memory in cimslpSLP.c 06/30/2010 [ 2968599 ] Wrong trace msg for invokeMethod (local interface) +06/09/2011 [ 3047562 ] [patch] Create bzip2 tarballs on "make dist" Mike Brasher, Inova ------------------- hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2011-06-09 22:39:04
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv17873 Modified Files: control.c cimcClientSfcbLocal.c ChangeLog NEWS contributions.txt Log Message: [ 3314383 Memory leak in CimResource_Enumerate_EP Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.585 retrieving revision 1.586 diff -u -d -r1.585 -r1.586 --- NEWS 8 Jun 2011 22:00:12 -0000 1.585 +++ NEWS 9 Jun 2011 22:39:02 -0000 1.586 @@ -13,6 +13,7 @@ - 3202466 Single item on method param of array type rejected via Local - 3287789 interopServerProvider not conservative when answering reqs - 3296541 CIM_IndicationSubscription corrupts after delilvery fails +- 3314383 Memory leak in CimResource_Enumerate_EP Changes in 1.3.11 ================= Index: cimcClientSfcbLocal.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimcClientSfcbLocal.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- cimcClientSfcbLocal.c 28 Apr 2011 21:48:28 -0000 1.40 +++ cimcClientSfcbLocal.c 9 Jun 2011 22:39:02 -0000 1.41 @@ -1910,6 +1910,7 @@ } CONNECT_UNLOCK(); free(ce); + sunsetControl(); uninitGarbageCollector(); return lib; } Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- control.c 29 Apr 2011 21:40:50 -0000 1.35 +++ control.c 9 Jun 2011 22:39:02 -0000 1.36 @@ -133,10 +133,15 @@ { int i,m; for (i = 0, m = sizeof(init) / sizeof(Control); i < m; i++) { - if(init[i].dupped) free(init[i].strValue); + if(init[i].dupped) { + free(init[i].strValue); + init[i].dupped = 0; + } + } + if (ct) { + ct->ft->release(ct); + ct=NULL; } - ct->ft->release(ct); - ct=NULL; } int setupControl(char *fn) Index: contributions.txt =================================================================== RCS file: /cvsroot/sblim/sfcb/contributions.txt,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- contributions.txt 28 Apr 2011 21:48:28 -0000 1.62 +++ contributions.txt 9 Jun 2011 22:39:02 -0000 1.63 @@ -180,6 +180,7 @@ 11/10/2010 [ 3101154 ] Daemon clients failed SfcbLocal connect due to permission 03/08/2011 [ 3202420 ] CDATA value in a string property is improperly XML escaped 04/28/2011 [ 3202466 ] Single item on method param of array type rejected via Local +06/09/2011 [ 3314383 Memory leak in CimResource_Enumerate_EP Josef Moellers -------------- Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.659 retrieving revision 1.660 diff -u -d -r1.659 -r1.660 --- ChangeLog 8 Jun 2011 22:00:12 -0000 1.659 +++ ChangeLog 9 Jun 2011 22:39:02 -0000 1.660 @@ -1,3 +1,9 @@ +2011-06-09 Chris Buccella <buc...@li...> + + * control.c, cimcClientSfcbLocal.c: + [ 3314383 Memory leak in CimResource_Enumerate_EP + (patch by Chris Poblete) + 2011-06-08 Chris Buccella <buc...@li...> * cimAccountPassthroughProvider.c, cimAccountPassthrough.mof, |
From: Chris B. <buc...@us...> - 2011-06-09 22:37:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 10d207a686ec964aa4f5e798cb32264eb3cd9461 (commit) from 61bae3e66fe2adc23bd8e50f777c1d9f50b911a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 10d207a686ec964aa4f5e798cb32264eb3cd9461 Author: buccella <buc...@li...> Date: Thu Jun 9 18:38:38 2011 -0400 [ 3314383 Memory leak in CimResource_Enumerate_EP ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index aef0fa2..3d10ba3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-06-09 Chris Buccella <buc...@li...> + + * control.c, cimcClientSfcbLocal.c: + [ 3314383 ] Memory leak in CimResource_Enumerate_EP + (patch by Chris Poblete) + 2011-06-01 Chris Buccella <buc...@li...> * interopServerProvider.c: diff --git a/NEWS b/NEWS index 9e9081e..28b4e5c 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,10 @@ Changes in 1.4.2 ================ +Everything in 1.3.12, plus: + + New features: -- 3190623 Set *IsSettable propperties to false for IndicationService - 3280992 Add systemd file to SFCB sources - 3177587 create sfcCommon (SFCB 1.4 now requires sfcCommon lib to be installed) - 3309374 Implement CIM_CIMXMLCommunicationMechanism @@ -11,9 +13,6 @@ New features: Bugs fixed: - 3199899 sfcb uninstall process should remove test mof's - -Everything in 1.3.12, plus: - - 3300167 Memory leaks caused by cimRequest changes Changes in 1.4.1 @@ -75,12 +74,18 @@ Everything in 1.3.10, plus: Changes in 1.3.12 ================= +New features: + +- 3190623 Set *IsSettable propperties to false for IndicationService +- 3313833 Allow for passthrough for expired user to update password + Bugs Fixed: - 3261868 Enum CQL filter on NULL cause incorrect rsp - 3213591 Local intf client abort abnormally on enum filter syntax err - 3291646 Unused var in __NullEvaluate - 3202466 Single item on method param of array type rejected via Local +- 3314383 Memory leak in CimResource_Enumerate_EP Changes in 1.3.11 ================= diff --git a/cimcClientSfcbLocal.c b/cimcClientSfcbLocal.c index a3bedaf..f4bd7fa 100644 --- a/cimcClientSfcbLocal.c +++ b/cimcClientSfcbLocal.c @@ -1954,6 +1954,7 @@ release(ClientEnv *ce) } CONNECT_UNLOCK(); free(ce); + sunsetControl(); uninitGarbageCollector(); return lib; } diff --git a/contributions.txt b/contributions.txt index a06e318..8f38a9f 100644 --- a/contributions.txt +++ b/contributions.txt @@ -183,6 +183,7 @@ Chris Poblete, Dell 11/10/2010 [ 3101154 ] Daemon clients failed SfcbLocal connect due to permission 03/09/2011 [ 3202420 ] CDATA value in a string property is improperly XML escaped 04/28/2011 [ 3202466 ] Single item on method param of array type rejected via Local +06/09/2011 [ 3314383 ] Memory leak in CimResource_Enumerate_EP Josef Moellers -------------- diff --git a/control.c b/control.c index 217bffa..debfba8 100644 --- a/control.c +++ b/control.c @@ -130,10 +130,15 @@ sunsetControl() m; for (i = 0, m = sizeof(init) / sizeof(Control); i < m; i++) { if (init[i].dupped) - free(init[i].strValue); + if(init[i].dupped) { + free(init[i].strValue); + init[i].dupped = 0; + } + } + if (ct) { + ct->ft->release(ct); + ct=NULL; } - ct->ft->release(ct); - ct = NULL; } int hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Tyrel D. <ty...@us...> - 2011-06-08 22:17:27
|
Update of /cvsroot/sblim/cmpi-syslog/syslog-service/util In directory vz-cvs-3.sog:/tmp/cvs-serv12139/syslog-service/util Modified Files: syslog-service.sh syslogserviceutil.c Log Message: Fixed 3287560: Adding rsyslog support for sblim-cmpi-syslog (Patch by Masatake Yamato) Index: syslogserviceutil.c =================================================================== RCS file: /cvsroot/sblim/cmpi-syslog/syslog-service/util/syslogserviceutil.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- syslogserviceutil.c 26 Aug 2009 01:53:54 -0000 1.8 +++ syslogserviceutil.c 8 Jun 2011 22:17:24 -0000 1.9 @@ -79,19 +79,28 @@ svname); if (strcmp(svname, "syslogd")==0) svc->syslogd = pid; if (strcmp(svname, "klogd")==0) svc->klogd = pid; + if (strcmp(svname, "rsyslogd")==0) { + /* rsyslog acts as both syslog and klogd */ + svc->syslogd = svc->klogd = pid; + } if (state) ret = 1; - } - svc->svName = strdup("syslog"); - if (svc && svc->syslogd && svc->klogd) { - svc->svStarted = 1; - svc->svStatus = strdup("OK"); - } - else { - svc->svStarted = 0; - svc->svStatus = strdup("Stopped"); } } + /* rsyslog? */ + svc->svName = strdup("syslog"); } + + if (svc) + { + if (svc->syslogd && svc->klogd) { + svc->svStarted = 1; + svc->svStatus = strdup("OK"); + } + else { + svc->svStarted = 0; + svc->svStatus = strdup("Stopped"); + } + } return ret; } Index: syslog-service.sh =================================================================== RCS file: /cvsroot/sblim/cmpi-syslog/syslog-service/util/syslog-service.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- syslog-service.sh 22 May 2009 03:50:49 -0000 1.5 +++ syslog-service.sh 8 Jun 2011 22:17:24 -0000 1.6 @@ -23,6 +23,8 @@ if [ -f /etc/redhat-release ] then +if [ -x /etc/init.d/syslog ]; +then case "$1" in start) /etc/init.d/syslog start @@ -43,7 +45,38 @@ echo "Unsupported method for RedHat!" exit 0 esac - +elif [ -x /etc/init.d/rsyslog ]; +then +case "$1" in + start) + /etc/init.d/rsyslog start + ;; + stop) + /etc/init.d/rsyslog stop + ;; + restart|reload) + /etc/init.d/rsyslog restart + ;; + condrestart) + /etc/init.d/rsyslog condrestart + ;; + status) + output=`/etc/init.d/rsyslog status` + if echo "$output" | grep Active: | grep inactive > /dev/null 2>&1; then + echo "stopped" + else + pid=`echo "$output" | sed -n -e 's/^[ \t]\+Main PID:[ \t]\+\([0-9]\+\).*/\1/p'` + echo "$pid rsyslog" + fi + ;; + *) + echo "Unsupported method for RedHat!" + exit 0 +esac +else + echo "Neither syslog nor rsyslog found!" + exit 0 +fi elif [ -f /etc/SuSE-release ] then case "$1" in |
From: Tyrel D. <ty...@us...> - 2011-06-08 22:17:26
|
Update of /cvsroot/sblim/cmpi-syslog/syslog-conf/util In directory vz-cvs-3.sog:/tmp/cvs-serv12139/syslog-conf/util Modified Files: syslogconfutil.h syslogsettingparse.c Log Message: Fixed 3287560: Adding rsyslog support for sblim-cmpi-syslog (Patch by Masatake Yamato) Index: syslogconfutil.h =================================================================== RCS file: /cvsroot/sblim/cmpi-syslog/syslog-conf/util/syslogconfutil.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- syslogconfutil.h 19 Aug 2009 00:53:34 -0000 1.7 +++ syslogconfutil.h 8 Jun 2011 22:17:24 -0000 1.8 @@ -23,10 +23,11 @@ #include <time.h> #include <stdio.h> +#include "config.h" -#define LogConfFile "/etc/syslog.conf" -#define ConfFileName "syslog.conf" -#define TmpConfFile "/etc/syslog.conf" +#define LogConfFile SYSLOG_CONF_DIR "/" SYSLOG_CONF_FILE +#define ConfFileName SYSLOG_CONF_FILE +#define TmpConfFile SYSLOG_CONF_DIR "/" SYSLOG_CONF_FILE #define ConfInFile "/tmp/tmpsyslogtest.conf" #define ConfOutFile "/tmp/syslogtest.conf" Index: syslogsettingparse.c =================================================================== RCS file: /cvsroot/sblim/cmpi-syslog/syslog-conf/util/syslogsettingparse.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- syslogsettingparse.c 23 May 2009 02:40:50 -0000 1.9 +++ syslogsettingparse.c 8 Jun 2011 22:17:24 -0000 1.10 @@ -39,7 +39,7 @@ char buf[32]; pid_t pid; - ifp=popen("/sbin/pidof syslogd", "r"); + ifp=popen("/sbin/pidof " SYSLOG_DAEMON, "r"); if ( ifp == NULL ) { syslog_debug(stderr, "Error in sending SIGHUP to syslogd.\n"); @@ -93,7 +93,13 @@ while ( fgets(cline, line_max, fp) != NULL) { for (p = cline; isspace(*p); ++p) ; - if (*p == '\0' || *p == '#') { + if ( + *p == '\0' + || *p == '#' + /* Ignore directive of rsyslog own. + TODO: $IncludeConfig should be handled. */ + || *p == '$' + ) { lineno++; continue; } @@ -136,7 +142,7 @@ } p = strdup((char*)line); - q = strtok(p, "\t"); + q = strtok(p, "\t "); q = strtok(NULL, "\n"); while(isspace(*q)) q++; strcpy(path, q); @@ -229,7 +235,13 @@ while (fgets(cline, line_max, fp) != NULL) { for (p = cline; isspace(*p); ++p); - if (*p == '\0' || *p == '#') { + if ( + *p == '\0' + || *p == '#' + /* Ignore directive of rsyslog own. + TODO: $IncludeConfig should be handled. */ + || *p == '$' + ) { lineno++; new++; continue; @@ -238,7 +250,7 @@ //get path from rule string tmpp = (char*)cline; - tmpq = strtok(tmpp, "\t"); + tmpq = strtok(tmpp, "\t "); tmpq = strtok(NULL, "\n"); while(isspace(*tmpq)) tmpq++; strcpy(tmppath, tmpq); @@ -249,7 +261,7 @@ if (strcmp(tmppath, path)==0) { bzero(tmppath, sizeof(tmppath)); strcpy(cline, p); // copy into new buffer - cline - p = strtok(cline, "\t"); // Get the first token, the filter expression + p = strtok(cline, "\t "); // Get the first token, the filter expression strcpy(cline, p); if (strncmp(action, "create", 6) == 0) { syslog_debug(stderr, "creating / inserting a rule\n"); |
From: Chris B. <buc...@us...> - 2011-06-08 22:00:15
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv9892 Modified Files: httpAdapter.c cimXmlRequest.c cimXmlRequest.h default.reg.in configure.ac ChangeLog NEWS Added Files: cimAccountPassthrough.mof cimAccountPassthroughProvider.c Log Message: [ 3313833 ] Allow for passthrough for expired user to update password Index: cimXmlRequest.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- cimXmlRequest.c 21 Dec 2010 23:01:49 -0000 1.61 +++ cimXmlRequest.c 8 Jun 2011 22:00:12 -0000 1.62 @@ -349,6 +349,27 @@ return rs; }; +#ifdef ALLOW_UPDATE_EXPIRED_PW + +static char * +getErrExpiredSegment() +{ + char* msg = sfcb_snprintf("<ERROR CODE=\"2\" \ +DESCRIPTION=\"User Account Expired\">\n\ +<INSTANCE CLASSNAME=\"CIM_Error\">\n\ +<PROPERTY NAME=\"ErrorType\" TYPE=\"uint16\">\ +<VALUE>1</VALUE></PROPERTY>\n\ +<PROPERTY NAME=\"OtherErrorType\" TYPE=\"string\">\ +<VALUE>Password Expired</VALUE></PROPERTY>\n\ +<PROPERTY NAME=\"ProbableCause\" TYPE=\"uint16\">\ +<VALUE>117</VALUE></PROPERTY>\n\ +</INSTANCE>\n</ERROR>\n"); + + return msg; +} + +#endif /* ALLOW_UPDATE_EXPIRED_PW */ + static RespSegments ctxErrResponse(RequestHdr * hdr, BinRequestContext * ctx, int meth) { @@ -2628,12 +2649,27 @@ {invokeMethod}, //OPS_InvokeMethod 24 }; -RespSegments handleCimXmlRequest(CimXmlRequestContext * ctx) +RespSegments sendHdrToHandler(RequestHdr* hdr, CimXmlRequestContext* ctx) { + + RespSegments rs; + Handler hdlr; + HeapControl *hc; + + hc = markHeap(); + hdlr = handlers[hdr->opType]; + rs = hdlr.handler(ctx, hdr); + releaseHeap(hc); + + ctx->className = hdr->className; + ctx->operation = hdr->opType; + + return rs; +} + +RespSegments handleCimXmlRequest(CimXmlRequestContext * ctx, int flags) { RespSegments rs; RequestHdr hdr; - Handler hdlr; - HeapControl *hc; #ifdef SFCB_DEBUG struct rusage us,ue; struct timeval sv, ev; @@ -2668,15 +2704,34 @@ rs = iMethodErrResponse(&hdr,getErrSegment(CMPI_RC_ERR_FAILED, "invalid imethodcall XML")); } - } else { - hc = markHeap(); - hdlr = handlers[hdr.opType]; - rs = hdlr.handler(ctx, &hdr); - releaseHeap(hc); - - ctx->className=hdr.className; - ctx->operation=hdr.opType; + } + +#ifdef ALLOW_UPDATE_EXPIRED_PW + else if (flags) { + + /* pulled from 1.4 branch's buildInvokeMethodRequest() */ + XtokMethodCall *req = hdr.cimRequest; + hdr.className = req->op.className.data; + + /* request from user with an expired password AND requesting password update */ + if (flags == (HCR_UPDATE_PW | HCR_EXPIRED_PW) && hdr.className && + (strcasecmp(hdr.className, "SFCB_Account") == 0) && hdr.methodCall) { + rs = sendHdrToHandler(&hdr, ctx); + } + else { /* expired user tried to invoke non-UpdatePassword request */ + if (hdr.methodCall) { + rs = methodErrResponse(&hdr, getErrExpiredSegment()); + } else { + rs = iMethodErrResponse(&hdr, getErrExpiredSegment()); + } + } } +#endif /* ALLOW_UPDATE_EXPIRED_PW */ + + else { + rs = sendHdrToHandler(&hdr, ctx); + } + rs.buffer = hdr.xmlBuffer; freeCimXmlRequest(hdr); Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.658 retrieving revision 1.659 diff -u -d -r1.658 -r1.659 --- ChangeLog 8 Jun 2011 20:29:13 -0000 1.658 +++ ChangeLog 8 Jun 2011 22:00:12 -0000 1.659 @@ -1,3 +1,10 @@ +2011-06-08 Chris Buccella <buc...@li...> + + * cimAccountPassthroughProvider.c, cimAccountPassthrough.mof, + cimXmlRequest.c, cimXmlRequest.h, httpAdapter.c, Makefile.am, + configure.ac, default.reg.in: + [ 3313833 ] Allow for passthrough for expired user to update password + 2011-05-02 Michael Chase-Salerno <br...@li...> * configure.ac Index: cimXmlRequest.h =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cimXmlRequest.h 16 May 2006 13:10:20 -0000 1.6 +++ cimXmlRequest.h 8 Jun 2011 22:00:12 -0000 1.7 @@ -60,8 +60,12 @@ int operation; } CimXmlRequestContext; -extern RespSegments handleCimXmlRequest(CimXmlRequestContext * ctx); +extern RespSegments handleCimXmlRequest(CimXmlRequestContext * ctx, int flags); extern int cleanupCimXmlRequest(RespSegments * rs); +#ifdef ALLOW_UPDATE_EXPIRED_PW + #define HCR_EXPIRED_PW 1 /* flag: expired user tries to auth */ + #define HCR_UPDATE_PW 2 /* flag: UpdateExpiredPassword HTTP header */ +#endif #endif --- NEW FILE: cimAccountPassthrough.mof --- [Description ("SFCB_Account is a dummy class used for the sole purpose of " "allowing an InvokeMethod request from an expired user to " "pass through to the CIM_Account provider in order to update " "the expired password." )] class SFCB_Account { [Description ("Provide the new password to be used in the " "ModifyInstance operation on CIM_Account. " )] uint8 UpdateExpiredPassword( [IN] string UserPassword, [OUT] string Message); }; Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- configure.ac 8 Jun 2011 20:29:13 -0000 1.118 +++ configure.ac 8 Jun 2011 22:00:12 -0000 1.119 @@ -117,6 +117,10 @@ [AC_HELP_STRING([--enable-uds], [Enable UDS authentication.])]) +AC_ARG_ENABLE(expired-pw-update, + [AC_HELP_STRING([--enable-expired-pw-update], + [allow a user with an expired account to invoke a password update for CIM_Account (see docs).])]) + # Size checks AC_CHECK_SIZEOF(void*) AC_CHECK_SIZEOF(int) @@ -183,6 +187,13 @@ AC_DEFINE(SLP_HOSTNAME_LIB,,[SLP Hostname lib enabled]) fi +if test "$enable_expired_pw_update" == "yes"; then + LOAD_SFCBACCOUNT_PROVIDER= + AC_DEFINE(ALLOW_UPDATE_EXPIRED_PW,1,[Expired Account Password Update enabled]) +else + LOAD_SFCBACCOUNT_PROVIDER='#' +fi +AC_SUBST(LOAD_SFCBACCOUNT_PROVIDER) # Check and configure requested tests. if test "$enable_tests" == "yes"; then @@ -195,7 +206,7 @@ fi fi if test "$enable_tests" != ""; then - enable_settableretry="yes" ++ enable_settableretry="yes" fi @@ -511,6 +522,7 @@ AM_CONDITIONAL(IPV6,[test "$enable_ipv6" == "yes"]) AM_CONDITIONAL(LOCAL_CONNECT_NO_INDICATION,[test "$enable_local_connect_only" == "yes" -a "$enable_indications" == "no"]) AM_CONDITIONAL(LOCAL_CONNECT_ONLY,[test "$enable_local_connect_only" == "yes"]) +AM_CONDITIONAL(ACCOUNT_PASSTHRU,[test "$enable_expired_pw_update" == "yes"]) AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh sfcbuuid.sh sfcb.cfg.pre getSchema.sh.pre 20_indication.mof.pre @@ -538,6 +550,7 @@ echo -e "uds"\\t\\t\\t\\t"${enable_uds:-no}" echo -e "tests"\\t\\t\\t\\t"${enable_tests:-no}" echo -e "debug"\\t\\t\\t\\t"${enable_debug:-no}" +echo -e "Allow expired account pw update"\\t"${enable_expired_pw_update:-no}" echo -e "Settable retry parameters"\\t"${enable_settableretry:-no}" echo ================================================================= echo Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- httpAdapter.c 8 Mar 2011 20:47:11 -0000 1.88 +++ httpAdapter.c 8 Jun 2011 22:00:12 -0000 1.89 @@ -749,6 +749,7 @@ struct timeval sv, ev; CimXmlRequestContext ctx; int breakloop; + int hcrFlags = 0; /* flags to pass to handleCimRequest() */ _SFCB_ENTER(TRACE_HTTPDAEMON, "doHttpRequest"); @@ -894,6 +895,11 @@ discardInput=2; } } +#ifdef ALLOW_UPDATE_EXPIRED_PW + else if (strncasecmp(hdr, "Pragma: UpdateExpiredPassword", 29) == 0) { + hcrFlags |= HCR_UPDATE_PW; + } +#endif } #if defined USE_SSL @@ -917,6 +923,7 @@ #endif int authorized = 0; + int barc = 0; #ifdef HAVE_UDS if (!discardInput && doUdsAuth) { struct sockaddr_un sun; @@ -930,13 +937,28 @@ } #endif if (!authorized && !discardInput && doBa) { - if (inBuf.authorization && (baValidate(inBuf.authorization,&inBuf.principal) != AUTH_PASS)) { - char more[]="WWW-Authenticate: Basic realm=\"cimom\"\r\n"; - genError(conn_fd, &inBuf, 401, "Unauthorized", more); - /* we continue to parse headers and empty the socket - to be graceful with the client */ - discardInput=1; - } + + if (inBuf.authorization) { + barc = baValidate(inBuf.authorization,&inBuf.principal); +#ifdef ALLOW_UPDATE_EXPIRED_PW + if (barc == AUTH_EXPIRED) { + hcrFlags |= HCR_EXPIRED_PW; + } + else if (barc == AUTH_PASS) { + hcrFlags = 0; /* clear flags so non-expired user doesn't update pw */ + } + else if (barc == AUTH_FAIL) { +#else + if (barc != AUTH_PASS) { +#endif + char more[]="WWW-Authenticate: Basic realm=\"cimom\"\r\n"; + genError(conn_fd, &inBuf, 401, "Unauthorized", more); + /* we continue to parse headers and empty the socket + to be graceful with the client */ + discardInput=1; + } + } + #if defined USE_SSL else if (sfcbSSLMode && ccVerifyMode != CC_VERIFY_IGNORE) { /* associate certificate with principal for next request */ @@ -1005,7 +1027,7 @@ } #endif - response = handleCimXmlRequest(&ctx); + response = handleCimXmlRequest(&ctx, hcrFlags); } else { response = nullResponse; Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.584 retrieving revision 1.585 diff -u -d -r1.584 -r1.585 --- NEWS 16 May 2011 22:14:08 -0000 1.584 +++ NEWS 8 Jun 2011 22:00:12 -0000 1.585 @@ -3,6 +3,7 @@ New features: - 3190623 Set *IsSettable properties to false for IndicationService +- 3313833 Allow for passthrough for expired user to update password Bugs fixed: Index: default.reg.in =================================================================== RCS file: /cvsroot/sblim/sfcb/default.reg.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- default.reg.in 17 May 2010 20:24:08 -0000 1.14 +++ default.reg.in 8 Jun 2011 22:00:12 -0000 1.15 @@ -70,6 +70,13 @@ @LOAD_INDICATION_PROVIDER@ type: association @LOAD_INDICATION_PROVIDER@ namespace: root/interop # +@LOAD_SFCBACCOUNT_PROVIDER@[SFCB_Account] +@LOAD_SFCBACCOUNT_PROVIDER@ provider: CimAccountPassthroughProvider +@LOAD_SFCBACCOUNT_PROVIDER@ location: sfccimAccountPassthroughProvider +@LOAD_SFCBACCOUNT_PROVIDER@ type: method +@LOAD_SFCBACCOUNT_PROVIDER@ namespace: root/interop +@LOAD_SFCBACCOUNT_PROVIDER@ parameters: AccountClass=root/cimv2:cim_account +# [SFCB_RegisteredProfile] provider: ProfileProvider location: sfcProfileProvider --- NEW FILE: cimAccountPassthroughProvider.c --- /* * cimAccountPassthroughProvider.c * * (C) Copyright IBM Corp. 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Author: Chris Buccella <buc...@li...> * * Description: * * This provider's only function is to handle an InvokeMethod request * for UpdateExpiredPassword and pass it on to the CIM_Account provider * */ #include "cmpi/cmpidt.h" #include "cmpi/cmpift.h" #include "cmpi/cmpimacs.h" #include <stdlib.h> #include <string.h> #include "trace.h" #include "native.h" /* * ------------------------------------------------------------------------- */ static const CMPIBroker *_broker; void setStatus(CMPIStatus *st, CMPIrc rc, char *msg) { st->rc = rc; if (rc != 0 && msg) st->msg = sfcb_native_new_CMPIString(msg, NULL, 0); else st->msg = NULL; } CMPIStatus CimAccountPassthroughProviderMethodCleanup(CMPIMethodMI * mi, const CMPIContext *ctx, CMPIBoolean terminate) { CMPIStatus st = { CMPI_RC_OK, NULL }; _SFCB_ENTER(TRACE_PROVIDERS, "CimAccountPassthroughProviderMethodCleanup"); _SFCB_RETURN(st); } CMPIStatus CimAccountPassthroughProviderInvokeMethod(CMPIMethodMI * mi, const CMPIContext *ctx, const CMPIResult *rslt, const CMPIObjectPath * ref, const char *methodName, const CMPIArgs * in, CMPIArgs * out) { CMPIStatus st = { CMPI_RC_OK, NULL }; _SFCB_ENTER(TRACE_PROVIDERS, "CimAccountPassthroughProviderInvokeMethod"); _SFCB_TRACE(1, ("--- Method: %s", methodName)); CMPIData arg = CMGetArg(in, "UserPassword", &st); if (st.rc != CMPI_RC_OK) { setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "Required argument UserPassword missing"); _SFCB_RETURN(st); } const char* newPW = CMGetCharPtr(arg.value.string); if (strcasecmp(methodName, "UpdateExpiredPassword") == 0) { /* check to see if parameters were specified in providerRegister */ CMPIStatus parm_st = { CMPI_RC_OK, NULL }; CMPIData parmdata = CMGetContextEntry(ctx, "sfcbProviderParameters", &parm_st); char* acct_cn = "CIM_Account"; char* acct_ns = "root/cimv2"; if (parm_st.rc == CMPI_RC_OK ) { const char* parms = CMGetCharPtr(parmdata.value.string); /* cacheLimit is currently the only param, so just take whatever is after the '=' */ char* val = strchr(parms,'='); if (val) { char* colon = strchr(val,':'); if (colon) { // acct_cn = colon + sizeof(char); acct_cn = colon+1; colon[0] = '\0'; acct_ns = val+1; } } } CMPIObjectPath *caOp = CMNewObjectPath(_broker, acct_ns, acct_cn, &st); if (strcasecmp(acct_cn, "cim_account")) { if (!CMClassPathIsA(_broker, caOp, "cim_account", &st)) { setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "Class specified for password update not a CIM_Account"); _SFCB_RETURN(st); } } CMPIData principal = CMGetContextEntry(ctx, "CMPIPrincipal", &st); char* httpUser = CMGetCharPtr(principal.value.string); /* Important! We assume the Name key = the expired HTTP user */ CMPIData item, nameKey; CMPIString* nameKeyStr; CMPIEnumeration *enm = CBEnumInstanceNames(_broker, ctx, caOp, &st); CMPIInstance *caInst = NULL; while (enm && CMHasNext(enm, &st)) { // fprintf(stderr, " got an instance of CIM_Account\n"); item = CMGetNext(enm, &st); caOp = item.value.ref; nameKey = CMGetKey(caOp, "Name", &st); if (st.rc == CMPI_RC_OK) { nameKeyStr = nameKey.value.string; if (strcmp(CMGetCharsPtr(nameKeyStr, &st), httpUser) == 0) { caInst = CBGetInstance(_broker, ctx, caOp, NULL, &st); break; } } } if (caInst) { /* ok to send ModifyInstance request to CIM_Account prov */ CMPIString* npwv; npwv = CMNewString(_broker, newPW, NULL); CMPIArray *pwArray = CMNewArray(_broker, 1, CMPI_string, &st); st = CMSetArrayElementAt(pwArray, 0, (CMPIValue*)&(npwv), CMPI_string); CMSetProperty(caInst, "UserPassword", (CMPIValue*)&(pwArray), CMPI_stringA); st = CBModifyInstance(_broker, ctx, caOp, caInst, NULL); CMPIValue av; av.string = st.msg; CMAddArg(out, "Message", &av, CMPI_string); } else { /* no caInst; probably wrong principal (UserName didn't match) */ _SFCB_TRACE(1, ("--- Invalid request method: %s", methodName)); setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "No matching CIM_Account for user"); } } else { _SFCB_TRACE(1, ("--- Invalid request method: %s", methodName)); setStatus(&st, CMPI_RC_ERR_METHOD_NOT_FOUND, "Invalid request method"); } _SFCB_RETURN(st); } CMMethodMIStub(CimAccountPassthroughProvider, CimAccountPassthroughProvider, _broker, CMNoHook); /* MODELINES */ /* DO NOT EDIT BELOW THIS COMMENT */ /* Modelines are added by 'make pretty' */ /* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ /* vi:set ts=2 sts=2 sw=2 expandtab: */ |
From: Tyrel D. <ty...@us...> - 2011-06-08 21:57:59
|
Update of /cvsroot/sblim/cmpi-syslog In directory vz-cvs-3.sog:/tmp/cvs-serv9629 Added Files: .cvsignore Log Message: autogenerated files to be ignored by CVS --- NEW FILE: .cvsignore --- Makefile Makefile.in aclocal.m4 autom4te.cache config.h config.h.in config.log config.status configure libtool stamp-h1 syslog-conf/.deps syslog-conf/.libs syslog-conf/Makefile syslog-conf/Makefile.in syslog-conf/Syslog_ConfUtils.lo syslog-conf/Syslog_Configuration.lo syslog-conf/Syslog_Setting.lo syslog-conf/Syslog_SettingContext.lo syslog-conf/libSyslog_ConfUtils.la syslog-conf/libSyslog_Configuration.la syslog-conf/libSyslog_Setting.la syslog-conf/libSyslog_SettingContext.la syslog-conf/libsyslogconfutil.la syslog-conf/libsyslogsettingparse.la syslog-conf/setting syslog-conf/syslogconfutil.lo syslog-conf/syslogsettingparse.lo syslog-log/.deps syslog-log/.libs syslog-log/Makefile syslog-log/Makefile.in syslog-log/Syslog_LogRecord.lo syslog-log/Syslog_LogUtils.lo syslog-log/Syslog_MessageLog.lo syslog-log/Syslog_RecordInLog.lo syslog-log/libSyslog_LogRecord.la syslog-log/libSyslog_LogUtils.la syslog-log/libSyslog_MessageLog.la syslog-log/libSyslog_RecordInLog.la syslog-log/libsysloglogutil.la syslog-log/libsyslogtimeparse.la syslog-log/sysloglogutil.lo syslog-log/syslogtimeparse.lo syslog-service/.deps syslog-service/.libs syslog-service/Makefile syslog-service/Makefile.in syslog-service/Syslog_Service.lo syslog-service/Syslog_ServiceUtils.lo syslog-service/libSyslog_Service.la syslog-service/libSyslog_ServiceProcess.la syslog-service/libSyslog_ServiceProcess_la-Syslog_ServiceProcess.lo syslog-service/libSyslog_ServiceUtils.la syslog-service/libsyslogserviceutil.la syslog-service/syslogserviceutil.lo |
From: Michael Chase-S. <mc...@us...> - 2011-06-08 20:29:15
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv23559 Modified Files: ChangeLog configure.ac Log Message: [ 3190623 ] Set *IsSettable propperties to false for IndicationService Problem with auto-enable when tests are enabled. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- configure.ac 29 Apr 2011 21:40:50 -0000 1.117 +++ configure.ac 8 Jun 2011 20:29:13 -0000 1.118 @@ -194,6 +194,10 @@ enable_tests="unit,gcov,wbemcli,xml,commands,slp,providers" fi fi +if test "$enable_tests" != ""; then + enable_settableretry="yes" +fi + OLDIFS="$IFS" IFS="," Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.657 retrieving revision 1.658 diff -u -d -r1.657 -r1.658 --- ChangeLog 16 May 2011 22:14:08 -0000 1.657 +++ ChangeLog 8 Jun 2011 20:29:13 -0000 1.658 @@ -1,3 +1,9 @@ +2011-05-02 Michael Chase-Salerno <br...@li...> + + * configure.ac + [ 3190623 ] Set *IsSettable propperties to false for IndicationService + Problem with auto-enable when tests are enabled. + 2011-05-16 Michael Chase-Salerno <br...@li...> * indCIMXMLHandler.c |
From: Chris B. <buc...@us...> - 2011-06-08 14:32:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 61bae3e66fe2adc23bd8e50f777c1d9f50b911a2 (commit) from 65450ac5a8757e028cd5fd40d487aa246f598346 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 61bae3e66fe2adc23bd8e50f777c1d9f50b911a2 Author: buccella <buc...@li...> Date: Wed Jun 8 10:33:29 2011 -0400 removed temp change for basicAuth ----------------------------------------------------------------------- Summary of changes: diff --git a/sfcb.cfg.pre.in b/sfcb.cfg.pre.in index fe4c9f8..fe3c8e2 100644 --- a/sfcb.cfg.pre.in +++ b/sfcb.cfg.pre.in @@ -58,7 +58,7 @@ useChunking: true ## Enable basic authentication for HTTP and HTTPS connections ## Default is false -doBasicAuth: true #temp change to test feature +doBasicAuth: false ## Name of of the authenticaion library. Leave off the ".so" ## Default is: sfcBasicAuthentication hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2011-06-07 21:31:26
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 65450ac5a8757e028cd5fd40d487aa246f598346 (commit) via a0896e08d930ad1b82ab8701402940346d7ef66e (commit) via 95a0393a17b40ec541f62c3c191769f3e82642ca (commit) via 709d963a5fd550486018759a8f7d375c22ad24e0 (commit) via 0bb2280635f1dbde8f8dde4d752dcb569d59aa11 (commit) via 70a642ebf8625ee1d2488c1d3e450ca1a252d7b8 (commit) via 82ef47f2144b6706e9eaffc03fc5e8c6e00107ba (commit) via 4de382767737c19c38f9f7805c7f2d3e9173ca80 (commit) via 2bee255dc5004ccd7ec8cc0b85ee4fedf0874525 (commit) via 9e3a08f88b30bf9fa4bafe3c9d01bd7e08c66a6e (commit) via 913392e6aca86dc1c1bcad08767840fe0a00a2b1 (commit) via a46aebdb2d77e1737ee8897b9145265dc6e981f7 (commit) via 640f180323478e2179c37855c6ef9ae0641e043a (commit) via bef9b8ddd6b84510dc126cad043ca99e77efe899 (commit) via 1327bc1ce2b3038ac35d2adbb302561b1f08dd5a (commit) from 58736a44fd57900550f127fdb70c96286f3defcd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 65450ac5a8757e028cd5fd40d487aa246f598346 Author: buccella <buc...@li...> Date: Tue Jun 7 17:31:21 2011 -0400 undid temp chagnes commit a0896e08d930ad1b82ab8701402940346d7ef66e Author: buccella <buc...@li...> Date: Tue Jun 7 16:54:31 2011 -0400 adding-in changes from updated patch. Namespace and class name of CIM_Account provider can now be specified as provider params commit 95a0393a17b40ec541f62c3c191769f3e82642ca Merge: 709d963a5fd550486018759a8f7d375c22ad24e0 58736a44fd57900550f127fdb70c96286f3defcd Author: buccella <buc...@li...> Date: Mon Jun 6 16:27:54 2011 -0400 Merge branch 'master' of ssh://sblim.git.sourceforge.net/gitroot/sblim/sfcb into IMM_expired_password Conflicts: ChangeLog configure.ac httpAdapter.c commit 709d963a5fd550486018759a8f7d375c22ad24e0 Author: buccella <buc...@li...> Date: Wed Apr 27 15:35:32 2011 -0400 change based on code review commit 0bb2280635f1dbde8f8dde4d752dcb569d59aa11 Author: buccella <buc...@li...> Date: Wed Apr 27 12:09:22 2011 -0400 dynamically add SFCB_Account entry to default.reg commit 70a642ebf8625ee1d2488c1d3e450ca1a252d7b8 Author: buccella <buc...@li...> Date: Tue Apr 26 18:34:30 2011 -0400 have ALLOW_UPDATE_EXPIRED_PW come from configure; get rid of hard define commit 82ef47f2144b6706e9eaffc03fc5e8c6e00107ba Author: buccella <buc...@li...> Date: Tue Apr 26 17:35:26 2011 -0400 updated CIM_Error XML again; added DESCRIPTION to ERROR commit 4de382767737c19c38f9f7805c7f2d3e9173ca80 Author: buccella <buc...@li...> Date: Mon Apr 25 17:54:37 2011 -0400 some simplification; encapsulated CIM_Error instance in ERROR tag commit 2bee255dc5004ccd7ec8cc0b85ee4fedf0874525 Author: buccella <buc...@li...> Date: Mon Apr 25 17:06:50 2011 -0400 clear hcr flags when necessary; remove printfs commit 9e3a08f88b30bf9fa4bafe3c9d01bd7e08c66a6e Author: buccella <buc...@li...> Date: Mon Apr 25 17:05:00 2011 -0400 added configure option enable-expired-pw-update commit 913392e6aca86dc1c1bcad08767840fe0a00a2b1 Author: buccella <buc...@li...> Date: Thu Apr 21 17:30:38 2011 -0400 added CIM_Error response commit a46aebdb2d77e1737ee8897b9145265dc6e981f7 Author: buccella <buc...@li...> Date: Thu Apr 21 14:58:28 2011 -0400 now pulls UserPassword from args commit 640f180323478e2179c37855c6ef9ae0641e043a Author: buccella <buc...@li...> Date: Tue Apr 19 14:28:48 2011 -0400 mostly working commit bef9b8ddd6b84510dc126cad043ca99e77efe899 Author: buccella <buc...@li...> Date: Tue Apr 19 14:28:38 2011 -0400 mostly working commit 1327bc1ce2b3038ac35d2adbb302561b1f08dd5a Author: buccella <buc...@li...> Date: Tue Apr 5 15:24:33 2011 -0400 [ 3203290 ] Basic Auth Should Consider Expired Passwords (missing line from the previous commit) ----------------------------------------------------------------------- Summary of changes: diff --git a/Makefile.am b/Makefile.am index 7326377..2f3dd61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -113,6 +113,12 @@ else PAM_LIBS = endif +if ACCOUNT_PASSTHRU + ACCOUNT_PASSTHRU_LIBS = libsfccimAccountPassthroughProvider.la +else + ACCOUNT_PASSTHRU_LIBS = +endif + sfcb_sharedobjects = \ $(sfcblibdir)/*.so @@ -137,7 +143,8 @@ sfcblib_LTLIBRARIES = \ $(QUALREP_LIBS) \ $(INDICATION_LIBS) \ $(PAM_LIBS) \ - $(SLP_HOSTNAME_LIBS) + $(SLP_HOSTNAME_LIBS) \ + $(ACCOUNT_PASSTHRU_LIBS) if TEST_ENABLED sfcblib_LTLIBRARIES += \ @@ -287,6 +294,12 @@ libsfcElementCapabilitiesProvider_la_SOURCES = \ libsfcElementCapabilitiesProvider_la_LIBADD=-lsfcBrokerCore libsfcElementCapabilitiesProvider_la_DEPENDENCIES=libsfcBrokerCore.la +if ACCOUNT_PASSTHRU +libsfccimAccountPassthroughProvider_la_SOURCES = cimAccountPassthroughProvider.c +libsfccimAccountPassthroughProvider_la_LIBADD=-lsfcBrokerCore +libsfccimAccountPassthroughProvider_la_DEPENDENCIES=libsfcBrokerCore.la +endif + libsfcClassProviderGz_la_SOURCES = \ classProviderGz.c libsfcClassProviderGz_la_LIBADD=-lsfcBrokerCore @SFCB_LIBZ@ @@ -417,7 +430,13 @@ EXTRA_DIST=sfcb.cfg.pre.in sfcb.spec sfcbrepos.sh.in sfcbstage.sh.in \ dist_sfcbdata_SCRIPTS=genSslCert.sh getSchema.sh test/stageschema.sh -dist_sfcbdata_DATA=default.reg 10_interop.mof 20_indication.mof indication.mof +if ACCOUNT_PASSTHRU +ACCOUNT_PASSTHRU_MOF = cimAccountPassthrough.mof +else +ACCOUNT_PASSTHRU_MOF = +endif + +dist_sfcbdata_DATA=default.reg 10_interop.mof 20_indication.mof indication.mof $(ACCOUNT_PASSTHRU_MOF) nodist_bin_SCRIPTS=sfcbrepos sfcbstage sfcbunstage sfcbuuid @@ -505,6 +524,9 @@ if INDICATIONS $(INSTALL_DATA) $(srcdir)/20_indication.mof $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop $(INSTALL_DATA) $(srcdir)/indication.mof $(DESTDIR)$(sfcbstatedir)/stage/mofs endif +if ACCOUNT_PASSTHRU + $(INSTALL_DATA) $(srcdir)/cimAccountPassthrough.mof $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop +endif if DOCS test -d $(DESTDIR)$(sfcbdocdir)/html || $(mkdir_p) $(DESTDIR)$(sfcbdocdir)/html $(INSTALL) -m 644 $(srcdir)/doc/html/* $(DESTDIR)$(sfcbdocdir)/html diff --git a/cimAccountPassthrough.mof b/cimAccountPassthrough.mof new file mode 100644 index 0000000..8fe3e34 --- /dev/null +++ b/cimAccountPassthrough.mof @@ -0,0 +1,13 @@ +[Description ("SFCB_Account is a dummy class used for the sole purpose of " + "allowing an InvokeMethod request from an expired user to " + "pass through to the CIM_Account provider in order to update " + "the expired password." +)] +class SFCB_Account +{ + [Description ("Provide the new password to be used in the " + "ModifyInstance operation on CIM_Account. " + )] + uint8 UpdateExpiredPassword( [IN] string UserPassword, [OUT] string Message); +}; + diff --git a/cimAccountPassthroughProvider.c b/cimAccountPassthroughProvider.c new file mode 100644 index 0000000..b41f803 --- /dev/null +++ b/cimAccountPassthroughProvider.c @@ -0,0 +1,174 @@ + +/* + * cimAccountPassthroughProvider.c + * + * (C) Copyright IBM Corp. 2011 + * + * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE + * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE + * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. + * + * You can obtain a current copy of the Eclipse Public License from + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * Author: Chris Buccella <buc...@li...> + * + * Description: + * + * This provider's only function is to handle an InvokeMethod request + * for UpdateExpiredPassword and pass it on to the CIM_Account provider + * + */ + +#include "cmpi/cmpidt.h" +#include "cmpi/cmpift.h" +#include "cmpi/cmpimacs.h" + +#include <stdlib.h> +#include <string.h> +#include "trace.h" +#include "native.h" + +/* + * ------------------------------------------------------------------------- + */ + +static const CMPIBroker *_broker; + +void +setStatus(CMPIStatus *st, CMPIrc rc, char *msg) +{ + st->rc = rc; + if (rc != 0 && msg) + st->msg = sfcb_native_new_CMPIString(msg, NULL, 0); + else + st->msg = NULL; +} + + +CMPIStatus +CimAccountPassthroughProviderMethodCleanup(CMPIMethodMI * mi, + const CMPIContext *ctx, CMPIBoolean terminate) +{ + CMPIStatus st = { CMPI_RC_OK, NULL }; + _SFCB_ENTER(TRACE_PROVIDERS, "CimAccountPassthroughProviderMethodCleanup"); + _SFCB_RETURN(st); +} + +CMPIStatus +CimAccountPassthroughProviderInvokeMethod(CMPIMethodMI * mi, + const CMPIContext *ctx, + const CMPIResult *rslt, + const CMPIObjectPath * ref, + const char *methodName, + const CMPIArgs * in, CMPIArgs * out) +{ + CMPIStatus st = { CMPI_RC_OK, NULL }; + + _SFCB_ENTER(TRACE_PROVIDERS, "CimAccountPassthroughProviderInvokeMethod"); + + _SFCB_TRACE(1, ("--- Method: %s", methodName)); + + CMPIData arg = CMGetArg(in, "UserPassword", &st); + if (st.rc != CMPI_RC_OK) { + setStatus(&st, CMPI_RC_ERR_NOT_FOUND, + "Required argument UserPassword missing"); + _SFCB_RETURN(st); + } + const char* newPW = CMGetCharPtr(arg.value.string); + + if (strcasecmp(methodName, "UpdateExpiredPassword") == 0) { + + /* check to see if parameters were specified in providerRegister */ + CMPIStatus parm_st = { CMPI_RC_OK, NULL }; + CMPIData parmdata = CMGetContextEntry(ctx, "sfcbProviderParameters", &parm_st); + char* acct_cn = "CIM_Account"; + char* acct_ns = "root/cimv2"; + + if (parm_st.rc == CMPI_RC_OK ) { + const char* parms = CMGetCharPtr(parmdata.value.string); + + /* there is only one param, so just take whatever is after the '=' */ + char* val = strchr(parms,'='); + if (val) { + char* colon = strchr(val,':'); + if (colon) { + acct_cn = colon+1; + colon[0] = '\0'; + acct_ns = val+1; + } + } + } + + CMPIObjectPath *caOp = CMNewObjectPath(_broker, acct_ns, acct_cn, &st); + + /* if a simple strcmp works, don't bother with the isa */ + if (strcasecmp(acct_cn, "cim_account")) { + if (!CMClassPathIsA(_broker, caOp, "cim_account", &st)) { + setStatus(&st, CMPI_RC_ERR_NOT_FOUND, + "Class specified for password update not a CIM_Account"); + _SFCB_RETURN(st); + } + } + + CMPIData principal = CMGetContextEntry(ctx, "CMPIPrincipal", &st); + char* httpUser = CMGetCharPtr(principal.value.string); + + /* Important! We assume the Name key = the expired HTTP user */ + CMPIData item, nameKey; + CMPIString* nameKeyStr; + CMPIEnumeration *enm = CBEnumInstanceNames(_broker, ctx, caOp, &st); + CMPIInstance *caInst = NULL; + + while (enm && CMHasNext(enm, &st)) { + item = CMGetNext(enm, &st); + caOp = item.value.ref; + nameKey = CMGetKey(caOp, "Name", &st); + if (st.rc == CMPI_RC_OK) { + nameKeyStr = nameKey.value.string; + if (strcmp(CMGetCharsPtr(nameKeyStr, &st), httpUser) == 0) { + caInst = CBGetInstance(_broker, ctx, caOp, NULL, &st); + break; + } + } + } + if (caInst) { /* ok to send ModifyInstance request to CIM_Account prov */ + + CMPIString* npwv; + npwv = CMNewString(_broker, newPW, NULL); + + CMPIArray *pwArray = CMNewArray(_broker, 1, CMPI_string, &st); + + st = CMSetArrayElementAt(pwArray, 0, (CMPIValue*)&(npwv), CMPI_string); + + CMPIData d = CMGetArrayElementAt(pwArray, 0, NULL); + CMPIString* s = d.value.string; + + CMSetProperty(caInst, "UserPassword", (CMPIValue*)&(pwArray), CMPI_stringA); + st = CBModifyInstance(_broker, ctx, caOp, caInst, NULL); + + CMPIValue av; + av.string = st.msg; + CMAddArg(out, "Message", &av, CMPI_string); + } + else { /* no caInst; probably wrong principal (UserName didn't match) */ + _SFCB_TRACE(1, ("--- Invalid request method: %s", methodName)); + setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "No matching CIM_Account for user"); + } + } + else { + _SFCB_TRACE(1, ("--- Invalid request method: %s", methodName)); + setStatus(&st, CMPI_RC_ERR_METHOD_NOT_FOUND, "Invalid request method"); + } + + _SFCB_RETURN(st); +} + + +CMMethodMIStub(CimAccountPassthroughProvider, CimAccountPassthroughProvider, _broker, CMNoHook); + +/* MODELINES */ +/* DO NOT EDIT BELOW THIS COMMENT */ +/* Modelines are added by 'make pretty' */ +/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ +/* vi:set ts=2 sts=2 sw=2 expandtab: */ diff --git a/cimRequest.c b/cimRequest.c index f65f2a8..a1b7c7a 100644 --- a/cimRequest.c +++ b/cimRequest.c @@ -327,6 +327,27 @@ methodErrResponse(RequestHdr * hdr, char *error) return rs; }; +#ifdef ALLOW_UPDATE_EXPIRED_PW + +static char * +getErrExpiredSegment() +{ + char* msg = sfcb_snprintf("<ERROR CODE=\"2\" \ +DESCRIPTION=\"User Account Expired\">\n\ +<INSTANCE CLASSNAME=\"CIM_Error\">\n\ +<PROPERTY NAME=\"ErrorType\" TYPE=\"uint16\">\ +<VALUE>1</VALUE></PROPERTY>\n\ +<PROPERTY NAME=\"OtherErrorType\" TYPE=\"string\">\ +<VALUE>Password Expired</VALUE></PROPERTY>\n\ +<PROPERTY NAME=\"ProbableCause\" TYPE=\"uint16\">\ +<VALUE>117</VALUE></PROPERTY>\n\ +</INSTANCE>\n</ERROR>\n"); + + return msg; +} + +#endif /* ALLOW_UPDATE_EXPIRED_PW */ + static RespSegments ctxErrResponse(RequestHdr * hdr, BinRequestContext * ctx, int meth) { @@ -1707,6 +1728,23 @@ static Handler handlers[] = { {invokeMethod}, // OPS_InvokeMethod 24 }; +RespSegments sendHdrToHandler(RequestHdr* hdr, CimRequestContext* ctx) { + + RespSegments rs; + Handler hdlr; + HeapControl *hc; + + hc = markHeap(); + hdlr = handlers[hdr->opType]; + rs = hdlr.handler(ctx, hdr); + releaseHeap(hc); + + ctx->className = hdr->className; + ctx->operation = hdr->opType; + + return rs; +} + static Scanner scanners[] = { #ifdef HANDLER_CIMRS {scanCimRsRequest}, @@ -1719,12 +1757,10 @@ static Scanner scanners[] = { static int scanner_count = sizeof(scanners) / sizeof(Scanner); RespSegments -handleCimRequest(CimRequestContext * ctx) +handleCimRequest(CimRequestContext * ctx, int flags) { RespSegments rs; RequestHdr hdr; - Handler hdlr; - HeapControl *hc; #ifdef SFCB_DEBUG struct rusage us, ue; @@ -1779,7 +1815,6 @@ handleCimRequest(CimRequestContext * ctx) timevalDiff(&us.ru_stime, &ue.ru_stime))); } #endif - if (hdr.rc) { if (hdr.methodCall) { rs = methodErrResponse(&hdr, getErrSegment(CMPI_RC_ERR_FAILED, @@ -1790,15 +1825,27 @@ handleCimRequest(CimRequestContext * ctx) hdr.errMsg)); // rs = iMethodErrResponse(&hdr, getErrSegment(CMPI_RC_ERR_FAILED, // "invalid imethodcall XML")); + } + } +#ifdef ALLOW_UPDATE_EXPIRED_PW + else if (flags) { + /* request from user with an expired password AND requesting password update */ + if (flags == (HCR_UPDATE_PW | HCR_EXPIRED_PW) && + (strcasecmp(hdr.className, "SFCB_Account") == 0) && hdr.methodCall) { + rs = sendHdrToHandler(&hdr, ctx); + } + else { /* expired user tried to invoke non-UpdatePassword request */ + if (hdr.methodCall) { + rs = methodErrResponse(&hdr, getErrExpiredSegment()); + } else { + rs = iMethodErrResponse(&hdr, getErrExpiredSegment()); + } + } } - } else { - hc = markHeap(); - hdlr = handlers[hdr.opType]; - rs = hdlr.handler(ctx, &hdr); - releaseHeap(hc); +#endif /* ALLOW_UPDATE_EXPIRED_PW */ - ctx->className = hdr.className; - ctx->operation = hdr.opType; + else { + rs = sendHdrToHandler(&hdr, ctx); } rs.buffer = hdr.buffer; rs.rc=0; diff --git a/cimRequest.h b/cimRequest.h index 8264534..a7416cd 100644 --- a/cimRequest.h +++ b/cimRequest.h @@ -85,9 +85,14 @@ typedef struct requestHdr { unsigned int sessionId; } RequestHdr; -extern RespSegments handleCimRequest(CimRequestContext * ctx); +extern RespSegments handleCimRequest(CimRequestContext * ctx, int flags); extern int cleanupCimXmlRequest(RespSegments * rs); +#ifdef ALLOW_UPDATE_EXPIRED_PW + #define HCR_EXPIRED_PW 1 /* flag: expired user tries to auth */ + #define HCR_UPDATE_PW 2 /* flag: UpdateExpiredPassword HTTP header */ +#endif + #endif /* MODELINES */ /* DO NOT EDIT BELOW THIS COMMENT */ diff --git a/configure.ac b/configure.ac index 1a7e376..ea7a637 100644 --- a/configure.ac +++ b/configure.ac @@ -115,6 +115,10 @@ AC_ARG_ENABLE(request-types, [AC_HELP_STRING([--enable-request-types(=TYPES)], [Enable support of listed request types. If none are listed, all are enabled.])]) +AC_ARG_ENABLE(expired-pw-update, + [AC_HELP_STRING([--enable-expired-pw-update], + [allow a user with an expired account to invoke a password update for CIM_Account (see docs).])]) + # Size checks AC_CHECK_SIZEOF(void*) AC_CHECK_SIZEOF(int) @@ -177,6 +181,13 @@ if test "$enable_slp_hostname_lib" == "yes"; then AC_DEFINE(SLP_HOSTNAME_LIB,,[SLP Hostname lib enabled]) fi +if test "$enable_expired_pw_update" == "yes"; then + LOAD_SFCBACCOUNT_PROVIDER= + AC_DEFINE(ALLOW_UPDATE_EXPIRED_PW,1,[Expired Account Password Update enabled]) +else + LOAD_SFCBACCOUNT_PROVIDER='#' +fi +AC_SUBST(LOAD_SFCBACCOUNT_PROVIDER) # Check and configure requested tests. if test "$enable_tests" == "yes"; then @@ -348,7 +359,6 @@ if test "$enable_settableretry" == "yes"; then AC_DEFINE(SETTABLERETRY,,[Settable indication parameters enabled]) fi - if test "$enable_qualifierrep" == "yes"; then LOAD_QUALIFIER_PROVIDER= AC_DEFINE(HAVE_QUALREP,,[Qualifier repository support enabled.]) @@ -551,6 +561,7 @@ AM_CONDITIONAL(DOCS,[test "$enable_docs" == "yes"]) AM_CONDITIONAL(IPV6,[test "$enable_ipv6" == "yes"]) AM_CONDITIONAL(LOCAL_CONNECT_NO_INDICATION,[test "$enable_local_connect_only" == "yes" -a "$enable_indications" == "no"]) AM_CONDITIONAL(LOCAL_CONNECT_ONLY,[test "$enable_local_connect_only" == "yes"]) +AM_CONDITIONAL(ACCOUNT_PASSTHRU,[test "$enable_expired_pw_update" == "yes"]) AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh sfcbuuid.sh sfcb.cfg.pre getSchema.sh.pre 20_indication.mof.pre @@ -578,6 +589,7 @@ echo -e "uds"\\t\\t\\t\\t"${enable_uds:-no}" echo -e "tests"\\t\\t\\t\\t"${enable_tests:-no}" echo -e "debug"\\t\\t\\t\\t"${enable_debug:-no}" echo -e "Request types"\\t\\t\\t"${enable_request_types}" +echo -e "Allow expired account pw update"\\t"${enable_expired_pw_update:-no}" echo -e "Settable retry parameters"\\t"${enable_settableretry:-no}" echo ================================================================= echo diff --git a/control.h b/control.h index cb88e13..63559ea 100644 --- a/control.h +++ b/control.h @@ -27,6 +27,7 @@ int getControlChars(char *id, char **val); int getControlUNum(char *id, unsigned int *val); int getControlNum(char *id, long *val); int getControlBool(char *id, int *val); +const char * sfcBrokerStart; #endif /* MODELINES */ diff --git a/default.reg.in b/default.reg.in index e2aab7e..8d16985 100644 --- a/default.reg.in +++ b/default.reg.in @@ -69,6 +69,13 @@ @LOAD_INDICATION_PROVIDER@ location: sfcElementCapabilitiesProvider @LOAD_INDICATION_PROVIDER@ type: association @LOAD_INDICATION_PROVIDER@ namespace: root/interop + +@LOAD_SFCBACCOUNT_PROVIDER@[SFCB_Account] +@LOAD_SFCBACCOUNT_PROVIDER@ provider: CimAccountPassthroughProvider +@LOAD_SFCBACCOUNT_PROVIDER@ location: sfccimAccountPassthroughProvider +@LOAD_SFCBACCOUNT_PROVIDER@ type: method +@LOAD_SFCBACCOUNT_PROVIDER@ parameters: AccountClass=root/cimv2:cim_account +@LOAD_SFCBACCOUNT_PROVIDER@ namespace: root/interop # [SFCB_RegisteredProfile] provider: ProfileProvider diff --git a/httpAdapter.c b/httpAdapter.c index aa2bee0..fa38195 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -228,6 +228,10 @@ remProcCtl() return 0; } +/* + * Call the authentication library + * Return 1 on success, 0 on fail, -1 on expired + */ int baValidate(char *cred, char **principal) { @@ -274,7 +278,6 @@ baValidate(char *cred, char **principal) } free(auth); - fprintf(stderr, "baValidate: returning %d\n", ret); return ret; } @@ -842,6 +845,8 @@ doHttpRequest(CommHndl conn_fd) ev; CimRequestContext ctx; int breakloop; + int hcrFlags = 0; /* flags to pass to handleCimRequest() */ + _SFCB_ENTER(TRACE_HTTPDAEMON, "doHttpRequest"); if (pauseCodec("http")) @@ -985,6 +990,11 @@ doHttpRequest(CommHndl conn_fd) discardInput = 2; } } +#ifdef ALLOW_UPDATE_EXPIRED_PW + else if (strncasecmp(hdr, "Pragma: UpdateExpiredPassword", 29) == 0) { + hcrFlags |= HCR_UPDATE_PW; + } +#endif } #if defined USE_SSL @@ -1012,6 +1022,7 @@ doHttpRequest(CommHndl conn_fd) #endif int authorized = 0; + int barc = 0; #ifdef HAVE_UDS if (!discardInput && doUdsAuth) { struct sockaddr_un sun; @@ -1028,17 +1039,29 @@ doHttpRequest(CommHndl conn_fd) } #endif if (!authorized && !discardInput && doBa) { - if (inBuf.authorization && - (baValidate(inBuf.authorization,&inBuf.principal) != AUTH_PASS)) { - char more[] = + if (inBuf.authorization) { + barc = baValidate(inBuf.authorization,&inBuf.principal); +#ifdef ALLOW_UPDATE_EXPIRED_PW + if (barc == AUTH_EXPIRED) { + hcrFlags |= HCR_EXPIRED_PW; + } + else if (barc == AUTH_PASS) { + hcrFlags = 0; /* clear flags so non-expired user doesn't update pw */ + } + else if (barc == AUTH_FAIL) { +#else + if (barc != AUTH_PASS) { +#endif + char more[] = "WWW-Authenticate: Basic realm=\"cimom\"\r\n"; - genError(conn_fd, &inBuf, 401, "Unauthorized", more); - /* - * we continue to parse headers and empty the socket to be graceful - * with the client - */ - discardInput = 1; - } + genError(conn_fd, &inBuf, 401, "Unauthorized", more); + /* + * we continue to parse headers and empty the socket to be graceful + * with the client + */ + discardInput = 1; + } + } #if defined USE_SSL else if (sfcbSSLMode && ccVerifyMode != CC_VERIFY_IGNORE) { /* @@ -1115,7 +1138,7 @@ doHttpRequest(CommHndl conn_fd) } #endif - response = handleCimRequest(&ctx); + response = handleCimRequest(&ctx, hcrFlags); } else { response = nullResponse; } diff --git a/sfcb.cfg.pre.in b/sfcb.cfg.pre.in index 70385f2..fe4c9f8 100644 --- a/sfcb.cfg.pre.in +++ b/sfcb.cfg.pre.in @@ -58,7 +58,7 @@ useChunking: true ## Enable basic authentication for HTTP and HTTPS connections ## Default is false -doBasicAuth: @SFCB_CONF_DOBASICAUTH@ +doBasicAuth: true #temp change to test feature ## Name of of the authenticaion library. Leave off the ".so" ## Default is: sfcBasicAuthentication hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Dave B. <bla...@us...> - 2011-06-04 11:10:38
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv9691/src/org/sblim/cimclient/internal/wbem Modified Files: Tag: Experimental CloseableIteratorSAX.java Log Message: 3311279 - Repeated Instantiation of SAXParserFactory Index: CloseableIteratorSAX.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/CloseableIteratorSAX.java,v retrieving revision 1.5.2.9 retrieving revision 1.5.2.10 diff -u -d -r1.5.2.9 -r1.5.2.10 --- CloseableIteratorSAX.java 2 Sep 2009 20:25:52 -0000 1.5.2.9 +++ CloseableIteratorSAX.java 4 Jun 2011 11:10:35 -0000 1.5.2.10 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -20,6 +20,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics * 2845211 2009-08-27 raman_arora Pull Enumeration Feature (SAX Parser) + * 3311279 2011-06-04 blaschke-oss Repeated Instantiation of SAXParserFactory */ package org.sblim.cimclient.internal.wbem; @@ -57,6 +58,8 @@ private CIMArgument<?>[] iCIMArgAL; + private static SAXParserFactory iFactory = SAXParserFactory.newInstance(); + /** * Ctor. * @@ -70,8 +73,7 @@ public CloseableIteratorSAX(InputStreamReader pStream, CIMObjectPath pPath) throws IOException, SAXException, ParserConfigurationException, WBEMException { XMLDefaultHandlerImpl handler = new XMLDefaultHandlerImpl(pPath); - SAXParserFactory factory = SAXParserFactory.newInstance(); - SAXParser saxParser = factory.newSAXParser(); + SAXParser saxParser = iFactory.newSAXParser(); try { saxParser.parse(new InputSource(pStream), handler); } catch (TrailerException e) { |
From: Dave B. <bla...@us...> - 2011-06-04 10:33:13
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications In directory vz-cvs-3.sog:/tmp/cvs-serv3488/src/org/sblim/cimclient/internal/wbem/indications Modified Files: CIMIndicationHandler.java Log Message: 3304953 - Indication URL mapped to lower case Index: CIMIndicationHandler.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications/CIMIndicationHandler.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- CIMIndicationHandler.java 4 Jun 2011 10:14:26 -0000 1.21 +++ CIMIndicationHandler.java 4 Jun 2011 10:33:10 -0000 1.22 @@ -32,6 +32,7 @@ * 3185763 2011-02-25 blaschke-oss Reliable indication support - Phase 1 * 3288721 2011-05-20 blaschke-oss Need the function of indication reordering * 3304058 2011-05-20 blaschke-oss Use same date format in change history + * 3304953 2011-05-20 blaschke-oss Indication URL mapped to lower case */ package org.sblim.cimclient.internal.wbem.indications; @@ -323,19 +324,21 @@ if (cimEvent instanceof CIMInstance) { CIMInstance indicationInst = (CIMInstance) cimEvent; - String path = pReader.getMethod().getFile().toLowerCase(); - String id = path; + String path = pReader.getMethod().getFile(); + String id; if (path == null) { id = pLocalAddress + "/"; } else if (path.equalsIgnoreCase("/cimom")) { id = path; - } else if (!path.startsWith("http")) { + } else if (path.length() < 4 || !path.regionMatches(true, 0, "http", 0, 4)) { if (path.startsWith("/")) { id = pLocalAddress + path; } else { id = pLocalAddress + "/" + path; } + } else /* path.startsWith("http") */{ + id = path; } if (this.iReliableIndicationsDisabled |
From: Dave B. <bla...@us...> - 2011-06-04 10:14:28
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory vz-cvs-3.sog:/tmp/cvs-serv32356/src/org/sblim/cimclient/internal/cimxml Modified Files: CIMXMLBuilderImpl.java Log Message: 3304058 - Use same date format in change history Index: CIMXMLBuilderImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLBuilderImpl.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- CIMXMLBuilderImpl.java 14 Jun 2010 20:00:46 -0000 1.33 +++ CIMXMLBuilderImpl.java 4 Jun 2011 10:14:26 -0000 1.34 @@ -1,7 +1,7 @@ /** * CIMXMLBuilderImpl.java * - * (C) Copyright IBM Corp. 2005, 2010 + * (C) Copyright IBM Corp. 2005, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -17,11 +17,11 @@ * Change History * Flag Date Prog Description *------------------------------------------------------------------------------ - * 16627 04/01/2005 thschaef Correct instantiation for Uint64 - * 17459 06/24/2005 thschaef catch null within createMethod method - * 17459 06/27/2005 thschaef further improvement to createMethod() + * 16627 2005-04-01 thschaef Correct instantiation for Uint64 + * 17459 2005-06-24 thschaef catch null within createMethod method + * 17459 2005-06-27 thschaef further improvement to createMethod() * 1535756 2006-08-07 lupusalex Make code warning free - * 1610046 07/12/2006 ebak Does not escape trailing spaces KEYVALUE + * 1610046 2006-07-12 ebak Does not escape trailing spaces KEYVALUE * 1631407 2007-01-11 lupusalex VALUE.REFERENCE doesn't handle references without namespace * 1656285 2007-02-12 ebak IndicationHandler does not accept non-Integer message ID * 1671505 2007-02-28 lupusalex Wrong escaping of spaces in XML (Undo 1610046) @@ -47,6 +47,7 @@ * 2957387 2010-03-03 blaschke-oss EmbededObject XML attribute must not be all uppercases * 2970881 2010-03-15 blaschke-oss Add property to control EmbeddedObject case * 3001333 2010-05-19 blaschke-oss CIMMethod class ignores propagated parameter + * 3304058 2011-05-20 blaschke-oss Use same date format in change history */ package org.sblim.cimclient.internal.cimxml; |
From: Dave B. <bla...@us...> - 2011-06-04 09:53:08
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications In directory vz-cvs-3.sog:/tmp/cvs-serv28204/src/org/sblim/cimclient/internal/wbem/indications Modified Files: CIMIndicationHandler.java Added Files: ReliableIndicationHandler.java Log Message: 3288721 - Need the function of indication reordering Index: CIMIndicationHandler.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications/CIMIndicationHandler.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- CIMIndicationHandler.java 11 Mar 2011 13:46:42 -0000 1.19 +++ CIMIndicationHandler.java 4 Jun 2011 09:53:05 -0000 1.20 @@ -30,6 +30,7 @@ * 3185818 2011-02-18 blaschke-oss indicationOccured URL incorrect * 3186176 2011-02-18 blaschke-oss XML response for indication not traced * 3185763 2011-02-25 blaschke-oss Reliable indication support - Phase 1 + * 3288721 2011-05-20 blaschke-oss Need the function of indication reordering */ package org.sblim.cimclient.internal.wbem.indications; @@ -63,6 +64,7 @@ import org.sblim.cimclient.internal.http.io.DebugInputStream; import org.sblim.cimclient.internal.logging.LogAndTraceBroker; import org.sblim.cimclient.internal.util.WBEMConfiguration; +import org.sblim.cimclient.internal.util.WBEMConfigurationDefaults; import org.sblim.cimclient.internal.wbem.CIMError; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -84,6 +86,12 @@ private boolean iReliableIndicationsDisabled = true; + private boolean iRIInitialized = false; + + private boolean iRISupported = false; + + private ReliableIndicationHandler iRIHandler; + /** * Ctor. * @@ -210,110 +218,98 @@ } } - /* - * Private variables beginning with iRI are for reliable indication support + /** + * deliverIndication handles reliable indications and returns a boolean + * indicating whether the indication should be delivered or not + * + * @param pIndication + * Indication. + * @param pId + * Path portion of indication URL. + * @param pInetAddress + * Host portion of indication URL. + * @return <code>true</code> if indication should be delivered, + * <code>false</code> if <code>ReliableIndicationHandler</code> will + * deliver indication */ - private boolean iRIInitialized = false; - - private boolean iRISupported = false; - - private String iRISequenceContext; - - private Long iRISequenceNumber; - - private long iRIArrivalTime; - - private long iRIIndentifierLifetime; - - private boolean deliverIndication(CIMInstance pIndication) { - // Nothing to check if reliable indications not supported + private boolean deliverIndication(CIMInstance pIndication, String pId, InetAddress pInetAddress) { + // Nothing to do if reliable indications initialized but not supported, + // go ahead and deliver if (this.iRIInitialized && !this.iRISupported) return true; - long arrivalTime = System.currentTimeMillis(); - - // Get reliable indication properties + // Get reliable indication properties from indication CIMProperty<?> seqCtxProp = pIndication.getProperty("SequenceContext"); CIMProperty<?> seqNumProp = pIndication.getProperty("SequenceNumber"); // Initialize (if not yet done so) to check if indication is reliable if (!this.iRIInitialized) { this.iRIInitialized = true; - if (seqCtxProp != null && seqNumProp != null) { - this.iRISupported = true; - - this.iRISequenceContext = (String) seqCtxProp.getValue(); - this.iRISequenceNumber = (Long) seqNumProp.getValue(); - this.iRIArrivalTime = arrivalTime; - - // Calculate sequence identifier lifetime (in milliseconds) - long attempts = this.iSessionProperties.getListenerDeliveryRetryAttempts(); - long interval = this.iSessionProperties.getListenerDeliveryRetryInterval(); - this.iRIIndentifierLifetime = attempts * interval * 10 * 1000; - this.iLogger.trace(Level.FINE, - "Reliable indication support enabled with DeliveryRetryAttempts=" - + attempts + ", DeliveryRetryInterval=" + interval); - } else { + // Reliable indication not found, disable support and go ahead and + // deliver + if (seqCtxProp == null || seqNumProp == null) { this.iRISupported = false; + this.iLogger .trace( Level.FINE, "Reliable indication support disabled, initial indication does not contain SequenceContext and SequenceNumber properties"); + + return true; } - return true; - } - if (seqCtxProp == null || seqNumProp == null) { + // Reliable indication found, enable support + this.iRISupported = true; + + // Validate DeliveryRetryAttempts property + long attempts = this.iSessionProperties.getListenerDeliveryRetryAttempts(); + if (attempts <= 0 || attempts > 1000) { + this.iLogger.trace(Level.FINE, "DeliveryRetryAttempts of " + attempts + + " outside range, using default value"); + + attempts = Long.valueOf(WBEMConfigurationDefaults.LISTENER_DELIVERY_RETRY_ATTEMPTS) + .longValue(); + + } + + // Validate DeliveryRetryInterval property + long interval = this.iSessionProperties.getListenerDeliveryRetryInterval(); + if (interval <= 0 || interval > 86400) { + this.iLogger.trace(Level.FINE, "DeliveryRetryInterval of " + interval + + " outside range, using default value"); + + interval = Long.valueOf(WBEMConfigurationDefaults.LISTENER_DELIVERY_RETRY_INTERVAL) + .longValue(); + } + + // Create new ReliableIndicationHandler for this + // CIMIndicationHandler + this.iRIHandler = new ReliableIndicationHandler(this.iDispatcher, attempts * interval + * 10 * 1000); + this.iLogger.trace(Level.FINE, - "Reliable indications supported but sequence property missing:\n" - + pIndication.toString()); - return true; - } + "Reliable indication support enabled, DeliveryRetryAttempts=" + attempts + + ", DeliveryRetryInterval=" + interval); - String seqCtx = (String) seqCtxProp.getValue(); - Long seqNum = (Long) seqNumProp.getValue(); + // Let ReliableIndicationHandler deliver it + this.iRIHandler.handleIndication(pIndication, pId, pInetAddress); + return false; - if (seqCtx.compareTo(this.iRISequenceContext) != 0) { + } + + // Reliable indication support is enabled but indication does not + // contain both properties, go ahead and deliver + if (seqCtxProp == null || seqNumProp == null) { this.iLogger.trace(Level.FINE, - "Reliable indications supported but context does not match:\n" + "Reliable indication support enabled but sequence property(s) missing:\n" + pIndication.toString()); - return true; - } - // Forget previous information if its lifetime expired - if (arrivalTime > this.iRIArrivalTime + this.iRIIndentifierLifetime) { - this.iLogger.trace(Level.FINE, "Sequence identifier lifetime expired for indication #" - + this.iRISequenceNumber.toString()); - this.iRISequenceNumber = seqNum; - this.iRIArrivalTime = arrivalTime; return true; } - long expectedNum = this.iRISequenceNumber.longValue() + 1; - int compareResult = seqNum.compareTo(this.iRISequenceNumber); - if (compareResult == 0) { - // Duplicate indication received, log and ignore - this.iLogger.trace(Level.FINE, "Duplicate indication #" + seqNum.toString() - + " received; indication ignored"); - return false; - } else if (compareResult < 0) { - // Out-of-order indication received, log and ignore - this.iLogger.trace(Level.FINE, "Out-of-order indication #" + seqNum.toString() - + " received (#" + expectedNum + " expected); indication ignored, logged:\n" - + pIndication.toString()); - return false; - } else { - if (seqNum.compareTo(Long.valueOf(expectedNum)) == 0) { - // Expected indication received, deliver - } else { - // Missing indication(s) detected, log and deliver - this.iLogger.trace(Level.FINE, "Missing indication(s) detected, #" - + seqNum.toString() + " received, #" + expectedNum + " expected"); - } - this.iRISequenceNumber = seqNum; - this.iRIArrivalTime = arrivalTime; - return true; - } + // Let ReliableIndicationHandler deliver it + this.iRIHandler.handleIndication(pIndication, pId, pInetAddress); + return false; } private CIMError dispatchIndications(MessageReader pReader, InetAddress pInetAddress, @@ -326,21 +322,23 @@ if (cimEvent instanceof CIMInstance) { CIMInstance indicationInst = (CIMInstance) cimEvent; - if (this.iReliableIndicationsDisabled || deliverIndication(indicationInst)) { - String path = pReader.getMethod().getFile().toLowerCase(); - String id = path; + String path = pReader.getMethod().getFile().toLowerCase(); + String id = path; - if (path == null) { - id = pLocalAddress + "/"; - } else if (path.equalsIgnoreCase("/cimom")) { - id = path; - } else if (!path.startsWith("http")) { - if (path.startsWith("/")) { - id = pLocalAddress + path; - } else { - id = pLocalAddress + "/" + path; - } + if (path == null) { + id = pLocalAddress + "/"; + } else if (path.equalsIgnoreCase("/cimom")) { + id = path; + } else if (!path.startsWith("http")) { + if (path.startsWith("/")) { + id = pLocalAddress + path; + } else { + id = pLocalAddress + "/" + path; } + } + + if (this.iReliableIndicationsDisabled + || deliverIndication(indicationInst, id, pInetAddress)) { this.iDispatcher.dispatchEvent(new CIMEvent(indicationInst, id, pInetAddress)); } --- NEW FILE: ReliableIndicationHandler.java --- /** * (C) Copyright IBM Corp. 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * @author : Dave Blaschke, IBM, bla...@us... * * * Change History * Flag Date Prog Description *------------------------------------------------------------------------------- * 3288721 2011-05-20 blaschke-oss Need the function of indication reordering */ package org.sblim.cimclient.internal.wbem.indications; import java.net.InetAddress; import java.util.Iterator; import java.util.LinkedList; import java.util.logging.Level; import javax.cim.CIMInstance; import javax.cim.CIMProperty; import org.sblim.cimclient.internal.logging.LogAndTraceBroker; /** * <code>ReliableIndicationHandler</code> is responsible for determining when to * dispatch reliable indications, which includes queuing unexpected indications, * caching all indications for the duration of their sequence identifier * lifetime, and logging missing, duplicate and out-of-order indications. This * functionality is based on the changes first introduced by DSP1054 v1.1. * * The <code>handleIndication</code>, <code>areAllEmpty</code> and * <code>processAll</code> methods need to be synchronized because they are the * entry points into <code>ReliableIndicationHandler</code> - the first is the * public entry point that needs to be passed each and every reliable * indication, the other two are only called by the DataManager thread and hence * protected. All of the private methods are only called from one of the three * synchronized methods. * * NOTE: <code>ReliableIndicationHandler</code> does NOT contain any logic for * handling sequence number wrapping. It was deemed unnecessary because of the * performance impact to each and every indication for a VERY rare occurrence: * sequence numbers are longs (signed 64-bit integers) that are are supposed to * start at 0, so even if the listener handled 1,000,00 indications per second, * it would take over 292,471 years for the sequence number to wrap. */ public class ReliableIndicationHandler { /** * <code>DataManager</code> is responsible for background processing of the * reliable indication queue and cache. */ private class DataManager extends Thread { private boolean iAlive = true; public DataManager() { setDaemon(true); } @Override public void run() { while (this.iAlive) { try { if (areAllEmpty()) { sleep(Integer.MAX_VALUE); } else { processAll(); sleep(1000); } } catch (Throwable t) { // Expected, ignore and try again } } } } /** * <code>ReliableIndication</code> represents an entry in the indication * delivery queue, and contains all the information required to manage and * dispatch the indication. Entries in the queue are stored in order of * increasing sequence number and are dispatched when the missing * indication(s) arrive or their sequence identifier lifetime expires. Only * one sequence context can be in the queue at any one time. */ private class ReliableIndication { private long iDiscardTime; private String iId; private CIMInstance iIndication; private InetAddress iInetAddress; private long iSequenceNumber; public ReliableIndication(CIMInstance pIndication, long pSequenceNumber, long pDiscardTime, String pId, InetAddress pInetAddress) { this.iIndication = pIndication; this.iSequenceNumber = pSequenceNumber; this.iDiscardTime = pDiscardTime; this.iId = pId; this.iInetAddress = pInetAddress; } public long getDiscardTime() { return this.iDiscardTime; } public String getId() { return this.iId; } public CIMInstance getIndication() { return this.iIndication; } public InetAddress getInetAddress() { return this.iInetAddress; } public long getSequenceNumber() { return this.iSequenceNumber; } } /** * <code>CacheEntry</code> represents an entry in the sequence identifier * cache. The sequence identifier is comprised of the sequence context and * sequence number, and must be cached for the duration of the sequence * identifier lifetime. Entries in the cache are stored in order of * increasing discard time. */ private class CacheEntry { private String iSeqContext; private long iSeqNumber; private long iDiscardTime; public CacheEntry(String pSequenceContext, long pSequenceNumber, long pDiscardTime) { this.iSeqContext = pSequenceContext; this.iSeqNumber = pSequenceNumber; this.iDiscardTime = pDiscardTime; } public long getDiscardTime() { return this.iDiscardTime; } public String getSequenceContext() { return this.iSeqContext; } public long getSequenceNumber() { return this.iSeqNumber; } } private LinkedList<ReliableIndication> iQueue = new LinkedList<ReliableIndication>(); private LinkedList<CacheEntry> iCache = new LinkedList<CacheEntry>(); private CIMEventDispatcher iDispatcher; private DataManager iDataManagerThread; private LogAndTraceBroker iLogger = LogAndTraceBroker.getBroker(); private long iIndentifierLifetime; // private long iLastArrivalTime; private String iLastSequenceContext; private Long iLastSequenceNumber; private long iExpectedSequenceNumber = 0; /** * Constructs a <code>ReliableIndicationHandler</code> instance that uses * the specified event dispatcher and sequence identifier lifetime to handle * reliable indications. * * @param pDispatcher * <code>CIMEventDispatcher</code> that does the actual * indication dispatching. * @param pIdentiferLifetime * Sequence identifier lifetime. */ public ReliableIndicationHandler(CIMEventDispatcher pDispatcher, long pIdentiferLifetime) { this.iDispatcher = pDispatcher; this.iIndentifierLifetime = pIdentiferLifetime; this.iDataManagerThread = new DataManager(); this.iDataManagerThread.start(); } /** * Adds a reliable indication to the indication delivery queue. * * @param pIndication * Reliable indication to be queued for delivery. */ private void addToQueue(ReliableIndication pIndication) { int size = this.iQueue.size(); if ((size == 0) || (this.iQueue.getLast().getSequenceNumber()) < pIndication.getSequenceNumber()) { this.iQueue.addLast(pIndication); } else { int i; for (i = size - 1; i >= 0; i--) { ReliableIndication indication = this.iQueue.get(i); if (indication.getSequenceNumber() < pIndication.getSequenceNumber()) { this.iQueue.add(i + 1, pIndication); // printQueue(); processQueue(); return; } } this.iQueue.addFirst(pIndication); } // printQueue(); // Process queue if there are two or more entries if (size > 0) processQueue(); } /** * Delivers all reliable indications in the indication delivery queue. */ private void flushQueue() { if (this.iQueue.isEmpty()) return; for (int i = this.iQueue.size() - 1; i >= 0; i--) { ReliableIndication indication = this.iQueue.removeFirst(); logMissingQueueEntries(indication.getSequenceNumber()); this.iDispatcher.dispatchEvent(new CIMEvent(indication.getIndication(), indication .getId(), indication.getInetAddress())); this.iExpectedSequenceNumber = indication.getSequenceNumber() + 1; } } /** * Determines if the indication delivery queue is empty. * * @return <code>true</code> if indication delivery queue is empty, * <code>false</code> otherwise. */ private boolean isQueueEmpty() { return this.iQueue.isEmpty(); } /** * Logs any missing reliable indications at the front of the indication * delivery queue. * * @param pSequenceNumber * Sequence number of first indication present in delivery queue. */ private void logMissingQueueEntries(long pSequenceNumber) { if (pSequenceNumber > this.iExpectedSequenceNumber) { for (long l = this.iExpectedSequenceNumber; l < pSequenceNumber; l++) { this.iLogger.trace(Level.FINE, "Missing indication #" + l + " detected"); } } } /** * Prints all reliable indications in the indication delivery queue. */ // private void printQueue() { // System.out.println("ReliableInidcation queue >"); // for (int i = 0; i < this.iQueue.size(); i++) { // ReliableIndication indication = this.iQueue.get(i); // System.out.println(" Q[" + i + "]: " + indication.getSequenceNumber() + // "@" // + indication.getDiscardTime()); // } // } /* */ /** * Processes the indication delivery queue and dispatches all reliable * indications whose sequence identifier lifetime has expired or whose * sequence numbers are in the expected order. */ private void processQueue() { if (this.iQueue.isEmpty()) return; long currentTime = System.currentTimeMillis(); ReliableIndication indication = this.iQueue.getFirst(); // First dispatch all indications whose lifetimes have expired while (indication.getDiscardTime() <= currentTime) { indication = this.iQueue.removeFirst(); logMissingQueueEntries(indication.getSequenceNumber()); this.iDispatcher.dispatchEvent(new CIMEvent(indication.getIndication(), indication .getId(), indication.getInetAddress())); this.iExpectedSequenceNumber = indication.getSequenceNumber() + 1; if (this.iQueue.isEmpty()) return; indication = this.iQueue.getFirst(); } // Second dispatch all indications that are in the expected order while (indication.getSequenceNumber() == this.iExpectedSequenceNumber) { indication = this.iQueue.removeFirst(); this.iDispatcher.dispatchEvent(new CIMEvent(indication.getIndication(), indication .getId(), indication.getInetAddress())); this.iExpectedSequenceNumber++; if (this.iQueue.isEmpty()) return; indication = this.iQueue.getFirst(); } } /** * Adds a reliable indication to the . * * @param pSequenceContext * Sequence context of reliable indication to be cached. * @param pSequenceNumber * Sequence number of reliable indication to be cached. * @param pDiscardTime * Sequence identifier lifetime expiration time. */ private void addToCache(String pSequenceContext, long pSequenceNumber, long pDiscardTime) { CacheEntry newEntry = new CacheEntry(pSequenceContext, pSequenceNumber, pDiscardTime); int size = this.iCache.size(); if ((size == 0) || (this.iCache.getLast().getDiscardTime() <= pDiscardTime)) { this.iCache.addLast(newEntry); } else { int i; for (i = size - 1; i >= 0; i--) { CacheEntry entry = this.iCache.get(i); if (entry.getDiscardTime() <= pDiscardTime) { this.iCache.add(i + 1, newEntry); // printCache(); return; } } this.iCache.addFirst(newEntry); } // printCache(); // Wake up thread if this is first entry in cache if (size == 0) this.iDataManagerThread.interrupt(); } /** * Removes all entries in the sequence identifier cache. */ // private void flushCache() { // this.iCache.clear(); // } /* */ /** * Determines if the sequence identifier cache is empty. * * @return <code>true</code> if sequence identifier cache is empty, * <code>false</code> otherwise. */ private boolean isCacheEmpty() { return this.iCache.isEmpty(); } /** * Determines if the sequence context is in the sequence identifier cache. * * @param pSequenceContext * Sequence context to look for. * @return <code>true</code> if sequence context is in sequence identifier * cache, <code>false</code> otherwise. */ private boolean isInCache(String pSequenceContext) { if (this.iCache.isEmpty()) return false; Iterator<CacheEntry> iterator = this.iCache.iterator(); while (iterator.hasNext()) { if (iterator.next().getSequenceContext().compareTo(pSequenceContext) == 0) return true; } return false; } /** * Determines if the sequence identifier (context and number) is in the * sequence identifier cache. * * @param pSequenceContext * Sequence context to look for. * @param pSequenceNumber * Sequence number to look for. * @return <code>true</code> if sequence identifier is in sequence * identifier cache, <code>false</code> otherwise. */ private boolean isInCache(String pSequenceContext, long pSequenceNumber) { if (this.iCache.isEmpty()) return false; Iterator<CacheEntry> iterator = this.iCache.iterator(); while (iterator.hasNext()) { CacheEntry entry = iterator.next(); if ((entry.getSequenceContext().compareTo(pSequenceContext) == 0) && (entry.getSequenceNumber() == pSequenceNumber)) return true; } return false; } /** * Prints all entries in the sequence identifier cache. */ // private void printCache() { // System.out.println("ReliableIndication cache >"); // for (int i = 0; i < this.iCache.size(); i++) { // CacheEntry entry = this.iCache.get(i); // System.out.println(" C[" + i + "]: " + entry.getSequenceContext() + "," // + entry.getSequenceNumber() + "@" + entry.getDiscardTime()); // } // } /* */ /** * Processes the sequence identifier cache and removes all entries whose * sequence identifier lifetime has expired. */ private void processCache() { if (this.iCache.isEmpty()) return; long currentTime = System.currentTimeMillis(); for (int i = this.iCache.size() - 1; i >= 0; i--) { if (this.iCache.getFirst().getDiscardTime() > currentTime) break; this.iCache.removeFirst(); } } /** * Determines if both the indication delivery queue and sequence identifier * cache are empty. * * @return <code>true</code> if both the indication delivery queue and * sequence identifier cache are empty, <code>false</code> * otherwise. */ protected synchronized boolean areAllEmpty() { return isCacheEmpty() && isQueueEmpty(); } /** * Flushes both the indication delivery queue and sequence identifier cache. */ // private void flushAll() { // flushQueue(); // flushCache(); // } /* */ /** * Processes both the indication delivery queue and sequence identifier * cache. */ protected synchronized void processAll() { processQueue(); processCache(); } /** * Main worker routine for <code>ReliableIndicationHandler</code>. The * indication is either sent directly to the <code>CIMEventDispatcher</code> * or placed in the indication delivery queue to be dispatched later. All * indications are placed in the sequence identifier cache. * * @param pIndication * Reliable indication. * @param pId * Path portion of reliable indication URL. * @param pInetAddress * Host portion of reliable indication URL. */ public synchronized void handleIndication(CIMInstance pIndication, String pId, InetAddress pInetAddress) { // Get current time long arrivalTime = System.currentTimeMillis(); // Get reliable indication properties from indication CIMProperty<?> seqCtxProp = pIndication.getProperty("SequenceContext"); CIMProperty<?> seqNumProp = pIndication.getProperty("SequenceNumber"); // Initial indication arrived, save knowledge about sequence identifier // and deliver if (this.iLastSequenceNumber == null) { // Remember sequence context/number and arrival time this.iLastSequenceContext = (String) seqCtxProp.getValue(); this.iLastSequenceNumber = (Long) seqNumProp.getValue(); this.iExpectedSequenceNumber = this.iLastSequenceNumber.longValue() + 1; // this.iLastArrivalTime = arrivalTime; // Cache sequence identifier addToCache(this.iLastSequenceContext, this.iLastSequenceNumber.longValue(), arrivalTime + this.iIndentifierLifetime); // Deliver indication this.iDispatcher.dispatchEvent(new CIMEvent(pIndication, pId, pInetAddress)); return; } String seqCtx = (String) seqCtxProp.getValue(); Long seqNum = (Long) seqNumProp.getValue(); long seqNumVal = seqNum.longValue(); // Indication arrived after sequence identifier lifetime of previous // indication expired, discard knowledge about previous sequence // identifier and deliver // if (arrivalTime > (this.iLastArrivalTime + // this.iIndentifierLifetime)) { // this.iLogger.trace(Level.FINE, // "Discarding knowledge of previous sequence identifier because lifetime expired"); // Nothing should be cached or enqueued at this point // flushAll(); // Remember sequence context/number and arrival time // this.iLastSequenceContext = seqCtx; // this.iLastSequenceNumber = seqNum; // this.iExpectedSequenceNumber = seqNumVal + 1; // this.iLastArrivalTime = arrivalTime; // Cache sequence identifier // addToCache(seqCtx, seqNumVal, arrivalTime + // this.iIndentifierLifetime); // Deliver indication // this.iDispatcher.dispatchEvent(new CIMEvent(pIndication, pId, // pInetAddress)); // return; // } // Indication arrived with different sequence context than expected if (seqCtx.compareTo(this.iLastSequenceContext) != 0) { // Cached sequence context indicates this indication arrived // out-of-order from previous context, log and ignore if (isInCache(seqCtx)) { this.iLogger.trace(Level.FINE, "Out-of-order indication #" + seqNumVal + " received from previous context; indication ignored, logged: " + pIndication.toString()); return; } this.iLogger.trace(Level.FINE, "Discarding knowledge of previous sequence identifier because context changed"); // Deliver all enqueued indications from previous context flushQueue(); // Remember sequence context and arrival time, sequence number // should be zero this.iLastSequenceContext = seqCtx; this.iLastSequenceNumber = Long.valueOf(0); this.iExpectedSequenceNumber = 1; // this.iLastArrivalTime = arrivalTime; // Cache sequence identifier addToCache(seqCtx, seqNumVal, arrivalTime + this.iIndentifierLifetime); // Expected sequence number, go ahead and deliver if (seqNumVal == 0) { this.iDispatcher.dispatchEvent(new CIMEvent(pIndication, pId, pInetAddress)); return; } // Unexpected (non-zero) sequence number, enqueue this.iLastSequenceNumber = Long.valueOf(-1); this.iExpectedSequenceNumber = 0; addToQueue(new ReliableIndication(pIndication, seqNumVal, arrivalTime + this.iIndentifierLifetime, pId, pInetAddress)); return; } // Indication arrived with expected sequence number, go ahead and // deliver if (seqNumVal == this.iExpectedSequenceNumber) { // Remember sequence context/number and arrival time this.iLastSequenceNumber = seqNum; this.iExpectedSequenceNumber = seqNumVal + 1; // this.iLastArrivalTime = arrivalTime; // Cache sequence identifier addToCache(seqCtx, seqNumVal, arrivalTime + this.iIndentifierLifetime); // Deliver indication this.iDispatcher.dispatchEvent(new CIMEvent(pIndication, pId, pInetAddress)); return; } // Duplicate indication arrived, log and ignore if (isInCache(seqCtx, seqNumVal)) { this.iLogger.trace(Level.FINE, "Duplicate indication #" + seqNumVal + " received; indication ignored"); // Cache sequence identifier (duplicate entries okay and much easier // than deleting/adding or moving) addToCache(seqCtx, seqNumVal, arrivalTime + this.iIndentifierLifetime); return; } // Out-of-order indication arrived, log and ignore if (seqNumVal < this.iExpectedSequenceNumber) { this.iLogger.trace(Level.FINE, "Out-of-order indication #" + seqNumVal + " received (#" + this.iExpectedSequenceNumber + " expected); indication ignored, logged: " + pIndication.toString()); // Cache sequence identifier addToCache(seqCtx, seqNumVal, arrivalTime + this.iIndentifierLifetime); return; } // Indication with higher sequence number than expected received, cache // and enqueue it addToCache(seqCtx, seqNumVal, arrivalTime + this.iIndentifierLifetime); addToQueue(new ReliableIndication(pIndication, seqNumVal, arrivalTime + this.iIndentifierLifetime, pId, pInetAddress)); return; } } |
From: Chris B. <buc...@us...> - 2011-06-01 22:13:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 58736a44fd57900550f127fdb70c96286f3defcd (commit) via 36c1ed68cd67bebdc628fed502dcf8ae5b600dbd (commit) via e8ea44314acae96d773c834a395948ed78be93af (commit) from db20e94be2bb895cacf61b5648c11403edb66b01 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 58736a44fd57900550f127fdb70c96286f3defcd Author: buccella <buc...@li...> Date: Wed Jun 1 18:13:53 2011 -0400 [ 3310364 ] Implement CIM_NamespaceInManager commit 36c1ed68cd67bebdc628fed502dcf8ae5b600dbd Merge: e8ea44314acae96d773c834a395948ed78be93af db20e94be2bb895cacf61b5648c11403edb66b01 Author: buccella <buc...@li...> Date: Wed Jun 1 17:54:14 2011 -0400 Merge branch 'master' of ssh://sblim.git.sourceforge.net/gitroot/sblim/sfcb commit e8ea44314acae96d773c834a395948ed78be93af Author: buccella <buc...@li...> Date: Mon May 30 17:19:51 2011 -0400 some refactoring; added handleAssocXYZ() functions to clean up getAccocs() ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 24f1cc4..aef0fa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-06-01 Chris Buccella <buc...@li...> + + * interopServerProvider.c: + [ 3310364 ] Implement CIM_NamespaceInManager + 2011-06-01 Narasimha Sharoff <nsh...@us...> * control.c, genSslCert.sh, httpAdapter.c, sfcb.cfg.pre.in diff --git a/NEWS b/NEWS index dec5553..9e9081e 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ New features: - 3177587 create sfcCommon (SFCB 1.4 now requires sfcCommon lib to be installed) - 3309374 Implement CIM_CIMXMLCommunicationMechanism - 3259627 provide a list acceptable CAs to client +- 3310364 Implement CIM_NamespaceInManager Bugs fixed: - 3199899 sfcb uninstall process should remove test mof's diff --git a/interopServerProvider.c b/interopServerProvider.c index 19e1507..c4dce99 100644 --- a/interopServerProvider.c +++ b/interopServerProvider.c @@ -391,24 +391,15 @@ ServiceProviderEnumInstanceNames(CMPIInstanceMI * mi, _SFCB_RETURN(st); } -static CMPIStatus -ObjectManagerProviderEnumInstances(CMPIInstanceMI * mi, - const CMPIContext *ctx, - const CMPIResult *rslt, - const CMPIObjectPath * ref, - const char **properties) +static CMPIInstance* +makeObjectManager() { - CMPIStatus st = { CMPI_RC_OK, NULL }; char str[512]; - CMPIObjectPath *op; - CMPIInstance *ci; CMPIUint16 state; CMPIBoolean bul = 0; - - _SFCB_ENTER(TRACE_PROVIDERS, "ObjectManagerProviderEnumInstances"); - - op = CMNewObjectPath(_broker, "root/interop", "CIM_ObjectManager", NULL); - ci = CMNewInstance(_broker, op, NULL); + CMPIObjectPath* op = CMNewObjectPath(_broker, "root/interop", + "CIM_ObjectManager", NULL); + CMPIInstance* ci = CMNewInstance(_broker, op, NULL); CMSetProperty(ci, "CreationClassName", "CIM_ObjectManager", CMPI_chars); CMSetProperty(ci, "SystemCreationClassName", "CIM_ComputerSystem", @@ -425,8 +416,21 @@ ObjectManagerProviderEnumInstances(CMPIInstanceMI * mi, CMSetProperty(ci, "RequestedState", &state, CMPI_uint16); state = 2; CMSetProperty(ci, "EnabledDefault", &state, CMPI_uint16); + return ci; +} - CMReturnInstance(rslt, ci); +static CMPIStatus +ObjectManagerProviderEnumInstances(CMPIInstanceMI * mi, + const CMPIContext *ctx, + const CMPIResult *rslt, + const CMPIObjectPath * ref, + const char **properties) +{ + CMPIStatus st = { CMPI_RC_OK, NULL }; + + _SFCB_ENTER(TRACE_PROVIDERS, "ObjectManagerProviderEnumInstances"); + + CMReturnInstance(rslt, makeObjectManager()); _SFCB_RETURN(st); } @@ -1107,8 +1111,11 @@ makeCIM_System(CMPIInstance *csi) CMReturn(CMPI_RC_OK); } -/** \brief makeHostedService - Builds a CIM_HostedService instance +/** \brief makeHostedService - Builds a CIM_HostedDependency instance: * + * CIM_HostedService + * CIM_NamespaceInManager + * * Creates and returns the instance (or name) of a CIM_HostedService * association between CIM_System and CIM_IndicationService */ @@ -1116,43 +1123,69 @@ CMPIStatus makeHostedService(CMPIAssociationMI * mi, const CMPIContext *ctx, const CMPIResult *rslt, - const CMPIObjectPath * isop, - const CMPIObjectPath * hsop, - const CMPIObjectPath * csop, + const CMPIObjectPath * dop, /* op of dependent */ + const CMPIObjectPath * hdop, /* op of assoc class */ + const CMPIObjectPath * aop, /* op of antecedent */ const char **propertyList, const char *target) { - CMPIEnumeration *isenm = NULL; + CMPIEnumeration *denm = NULL; CMPIStatus rc = { CMPI_RC_OK, NULL }; - CMPIInstance *hsi, - *cci; + CMPIInstance *hdi, + *anti; + + /* make an instance for the antecedent + (System or ObjectManager) */ + CMPIString* acn = CMGetClassName(aop, NULL); + if (strcasecmp(CMGetCharPtr(acn), "CIM_System") == 0) { + anti = CMNewInstance(_broker, aop, &rc); + makeCIM_System(anti); + } + else if (strcasecmp(CMGetCharPtr(acn), "CIM_ObjectManager") == 0) { + anti = makeObjectManager(); + } + else { /* should never happen */ + rc.rc = CMPI_RC_ERR_FAILED; + return rc; + } - cci = CMNewInstance(_broker, csop, &rc); - makeCIM_System(cci); + /* Get the SINGLE instance of the dependent + (IndicationService or Namespace) */ + CMPIString* dcn = CMGetClassName(dop, NULL); + CMPIValue depop; + if (strcasecmp(CMGetCharPtr(dcn), "CIM_IndicationService") == 0) { + denm = _broker->bft->enumerateInstanceNames(_broker, ctx, dop, &rc); + CMPIData dinst = CMGetNext(denm, &rc); + depop = dinst.value; + } + else if (strcasecmp(CMGetCharPtr(dcn), "CIM_Namespace") == 0) { + depop.ref = (CMPIObjectPath*)dop; + } + else { /* should never happen */ + rc.rc = CMPI_RC_ERR_FAILED; + return rc; + } - // Get the single instance of IndicationService - isenm = _broker->bft->enumerateInstanceNames(_broker, ctx, isop, &rc); - CMPIData isinst = CMGetNext(isenm, &rc); - // Create an instance - hsi = CMNewInstance(_broker, hsop, &rc); - CMPIValue cciop; - cciop.ref = CMGetObjectPath(cci, NULL); + /* Create an instance of the assoc class */ + hdi = CMNewInstance(_broker, hdop, &rc); + CMPIValue antiop; + antiop.ref = CMGetObjectPath(anti, NULL); - CMSetProperty(hsi, "Dependent", &(isinst.value), CMPI_ref); - CMSetProperty(hsi, "Antecedent", &(cciop), CMPI_ref); + CMSetProperty(hdi, "Dependent", &(depop), CMPI_ref); + CMSetProperty(hdi, "Antecedent", &(antiop), CMPI_ref); if (strcasecmp(target, "Refs") == 0) { if (propertyList) { - CMSetPropertyFilter(hsi, propertyList, NULL); + CMSetPropertyFilter(hdi, propertyList, NULL); } - CMReturnInstance(rslt, hsi); + CMReturnInstance(rslt, hdi); } else { - CMReturnObjectPath(rslt, CMGetObjectPath(hsi, NULL)); + CMReturnObjectPath(rslt, CMGetObjectPath(hdi, NULL)); } - if (cci) - CMRelease(cci); - if (hsi) - CMRelease(hsi); - if (isenm) - CMRelease(isenm); + if (anti) + CMRelease(anti); + if (hdi) + CMRelease(hdi); + if (denm) + CMRelease(denm); CMReturnDone(rslt); CMReturn(CMPI_RC_OK); } @@ -1199,88 +1232,28 @@ makeElementConforms(CMPIAssociationMI * mi, CMReturnDone(rslt); CMReturn(CMPI_RC_OK); } -/** \brief getAssociators - Builds the Association or Reference instances - * - * Determines what needs to be returned for the various associator and - * reference calls. - */ -CMPIStatus -getAssociators(CMPIAssociationMI * mi, - const CMPIContext *ctx, - const CMPIResult *rslt, - const CMPIObjectPath * cop, - const char *assocClass, - const char *resultClass, - const char *role, - const char *resultRole, - const char **propertyList, const char *target) -{ +static CMPIStatus handleAssocSAE(CMPIAssociationMI* mi, + const CMPIContext* ctx, + const CMPIResult* rslt, + const CMPIObjectPath* cop, + const char* resultClass, + const char* role, + const char* resultRole, + const char** propertyList, + const char* target, + CMPIObjectPath* saeop) +{ CMPIStatus rc = { CMPI_RC_OK, NULL }; - CMPIObjectPath *saeop = NULL, - *ldop = NULL, - *ifop = NULL, - *isop = NULL; - CMPIObjectPath *csop = NULL, - *hsop = NULL, - *ecpop = NULL, - *rpop = NULL; - CMPIInstance *cci; - CMPIEnumeration *isenm = NULL; - - // Make sure role & resultRole are valid - if (role && resultRole && (strcasecmp(role, resultRole) == 0)) { - CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, - "role and resultRole cannot be equal."); - return rc; - } - if (role && (strcasecmp(role, "AffectingElement") != 0) - && (strcasecmp(role, "AffectedElement") != 0) - && (strcasecmp(role, "ConformantStandard") != 0) - && (strcasecmp(role, "ManagedElement") != 0) - && (strcasecmp(role, "Antecedent") != 0) - && (strcasecmp(role, "Dependent") != 0)) { - CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, - "Invalid value for role ."); - return rc; - } - if (resultRole && (strcasecmp(resultRole, "AffectingElement") != 0) - && (strcasecmp(resultRole, "AffectedElement") != 0) - && (strcasecmp(resultRole, "ConformantStandard") != 0) - && (strcasecmp(resultRole, "ManagedElement") != 0) - && (strcasecmp(resultRole, "Antecedent") != 0) - && (strcasecmp(resultRole, "Dependent") != 0)) { - CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, - "Invalid value for resultRole ."); - return rc; - } - - saeop = - CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), - "SFCB_ServiceAffectsElement", &rc); - hsop = - CMNewObjectPath(_broker, "root/interop", "CIM_HostedService", &rc); - ecpop = - CMNewObjectPath(_broker, "root/interop", - "SFCB_ElementConformsToProfile", &rc); - if ((saeop == NULL) || (hsop == NULL) || (ecpop == NULL)) { - CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, - "Create CMPIObjectPath failed."); - return rc; - } - // Make sure we are getting a request for the right assoc class - if ((assocClass == NULL) - || (CMClassPathIsA(_broker, saeop, assocClass, &rc) == 1)) { - // Handle SFCB_ServiceAffectsElement // Get pointers to all the interesting classes. - ldop = + CMPIObjectPath* ldop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), "CIM_listenerdestination", &rc); - ifop = + CMPIObjectPath* ifop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), "CIM_indicationfilter", &rc); - isop = + CMPIObjectPath* isop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), "CIM_indicationservice", &rc); if ((ldop == NULL) || (ifop == NULL) || (isop == NULL)) { @@ -1322,16 +1295,26 @@ getAssociators(CMPIAssociationMI * mi, target); } } - } - // Handle CIM_HostedService + return rc; +} - if ((assocClass == NULL) - || (CMClassPathIsA(_broker, hsop, assocClass, &rc) == 1)) { +static CMPIStatus handleAssocHostedService(CMPIAssociationMI* mi, + const CMPIContext* ctx, + const CMPIResult* rslt, + const CMPIObjectPath* cop, + const char* resultClass, + const char* role, + const char* resultRole, + const char** propertyList, + const char* target, + CMPIObjectPath* hsop) +{ + CMPIStatus rc = { CMPI_RC_OK, NULL }; - isop = + CMPIObjectPath* isop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), "CIM_indicationservice", &rc); - csop = CMNewObjectPath(_broker, "root/cimv2", "CIM_System", &rc); + CMPIObjectPath* csop = CMNewObjectPath(_broker, "root/cimv2", "CIM_System", &rc); if ((csop == NULL) || (isop == NULL)) { CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, "Create CMPIObjectPath failed."); @@ -1350,7 +1333,7 @@ getAssociators(CMPIAssociationMI * mi, && (resultClass == NULL || (strcasecmp(resultClass, "CIM_System") == 0))) { // Return the CIM_System instance - cci = CMNewInstance(_broker, csop, &rc); + CMPIInstance* cci = CMNewInstance(_broker, csop, &rc); makeCIM_System(cci); if (strcasecmp(target, "Assocs") == 0) { if (propertyList) { @@ -1368,7 +1351,7 @@ getAssociators(CMPIAssociationMI * mi, // Return the CIM_HostedService instance makeHostedService(mi, ctx, rslt, isop, hsop, csop, propertyList, target); - } + } } if ((role == NULL || strcasecmp(role, "antecedent") == 0) @@ -1385,7 +1368,7 @@ getAssociators(CMPIAssociationMI * mi, || (strcasecmp(resultClass, "CIM_IndicationService") == 0))) { // Return the CIM_IndicationService instance - isenm = + CMPIEnumeration* isenm = _broker->bft->enumerateInstances(_broker, ctx, isop, NULL, &rc); CMPIData inst = CMGetNext(isenm, &rc); @@ -1406,15 +1389,131 @@ getAssociators(CMPIAssociationMI * mi, target); } } - } - // Handle ElementConformstoProfile - if (((assocClass == NULL) - || (CMClassPathIsA(_broker, ecpop, assocClass, &rc) == 1)) - && (CMClassPathIsA(_broker, cop, "cim_indicationservice", &rc) == 1)) { - isop = + return rc; +} + +static CMPIStatus handleAssocNIM(CMPIAssociationMI* mi, + const CMPIContext* ctx, + const CMPIResult* rslt, + const CMPIObjectPath* cop, + const char* resultClass, + const char* role, + const char* resultRole, + const char** propertyList, + const char* target, + CMPIObjectPath* nimop) +{ + CMPIStatus rc = { CMPI_RC_OK, NULL }; + + CMPIObjectPath* nsop = + CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), + "CIM_Namespace", &rc); + CMPIObjectPath* omop = CMNewObjectPath(_broker, "root/interop", "CIM_ObjectManager", &rc); + if ((nsop == NULL) || (omop == NULL)) { + CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, + "Create CMPIObjectPath failed."); + return rc; + } + + /* A Namespace was passed in, so we need to return either + the ObjectManager instance or an association instance */ + if ((role == NULL || (strcasecmp(role, "dependent") == 0)) + && (resultRole == NULL + || (strcasecmp(resultRole, "antecedent") == 0)) + && CMClassPathIsA(_broker, cop, "cim_namespace", &rc) == 1) { + if (((strcasecmp(target, "Assocs") == 0) + || (strcasecmp(target, "AssocNames") == 0)) + && (resultClass == NULL + || (strcasecmp(resultClass, "CIM_ObjectManager") == 0))) { + + /* check it if the ObjectManager cop exists */ + CBGetInstance(_broker, ctx, cop, NULL, &rc); + if (rc.rc != CMPI_RC_OK) + return rc; + + /* Return the CIM_ObjectManager instance */ + CMPIInstance* cci = makeObjectManager(); + if (strcasecmp(target, "Assocs") == 0) { + if (propertyList) { + CMSetPropertyFilter(cci, propertyList, NULL); + } + CMReturnInstance(rslt, cci); + } else { + CMReturnObjectPath(rslt, CMGetObjectPath(cci, NULL)); + } + if (cci) + CMRelease(cci); + + } else if (resultClass == NULL + || (strcasecmp(resultClass, "CIM_NamespaceInManager") == 0)) { + /* Return the NIM instance */ + makeHostedService(mi, ctx, rslt, nsop, nimop, omop, propertyList, + target); + } + + } + + /* An ObjectManager was passed in so wee need to return either the + * Namespace instances or a CIM_NamespaceInManager association + * instance */ + if ((role == NULL || strcasecmp(role, "antecedent") == 0) + && (resultRole == NULL || strcasecmp(resultRole, "dependent") == 0) + && (CMClassPathIsA(_broker, cop, "cim_objectmanager", &rc) == 1)) { + + /* check it if the ObjectManager cop exists */ + CBGetInstance(_broker, ctx, cop, NULL, &rc); + if (rc.rc != CMPI_RC_OK) + return rc; + + if (((strcasecmp(target, "Assocs") == 0) + || (strcasecmp(target, "AssocNames") == 0)) + && (resultClass == NULL + || (strcasecmp(resultClass, "CIM_Namespace") == + 0))) { + /* Return the CIM_Namespace instances */ + CMPIEnumeration* nsenm = + CBEnumInstances(_broker, ctx, nsop, NULL, &rc); + CMPIData inst = CMGetNext(nsenm, &rc); + for (; inst.state == CMPI_goodValue; inst = CMGetNext(nsenm, &rc)) { + + if (strcasecmp(target, "Assocs") == 0) { + if (propertyList) { + CMSetPropertyFilter(inst.value.inst, propertyList, NULL); + } + CMReturnInstance(rslt, (inst.value.inst)); + } else { + CMReturnObjectPath(rslt, CMGetObjectPath(inst.value.inst, NULL)); + } + } + if (nsenm) + CMRelease(nsenm); + } else if (resultClass == NULL + || (strcasecmp(resultClass, "CIM_NamespaceInManager") == 0)) { + /* Return the NIM instance */ + makeHostedService(mi, ctx, rslt, nsop, nimop, omop, propertyList, + target); + } + } + return rc; +} + +static CMPIStatus handleAssocElementConforms(CMPIAssociationMI* mi, + const CMPIContext* ctx, + const CMPIResult* rslt, + const CMPIObjectPath* cop, + const char* resultClass, + const char* role, + const char* resultRole, + const char** propertyList, + const char* target, + CMPIObjectPath* ecpop) +{ + CMPIStatus rc = { CMPI_RC_OK, NULL }; + + CMPIObjectPath* isop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), "CIM_indicationservice", &rc); - rpop = + CMPIObjectPath* rpop = CMNewObjectPath(_broker, "root/interop", "SFCB_RegisteredProfile", &rc); if ((rpop == NULL) || (isop == NULL)) { @@ -1488,6 +1587,100 @@ getAssociators(CMPIAssociationMI * mi, } } + return rc; +} + +/** \brief getAssociators - Builds the Association or Reference instances + * + * Determines what needs to be returned for the various associator and + * reference calls. + */ +CMPIStatus +getAssociators(CMPIAssociationMI * mi, + const CMPIContext *ctx, + const CMPIResult *rslt, + const CMPIObjectPath * cop, + const char *assocClass, + const char *resultClass, + const char *role, + const char *resultRole, + const char **propertyList, const char *target) +{ + + CMPIStatus rc = { CMPI_RC_OK, NULL }; + CMPIObjectPath *saeop = NULL; + CMPIObjectPath *hsop = NULL, + *ecpop = NULL, + *nimop = NULL; + + // Make sure role & resultRole are valid + if (role && resultRole && (strcasecmp(role, resultRole) == 0)) { + CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, + "role and resultRole cannot be equal."); + return rc; + } + if (role && (strcasecmp(role, "AffectingElement") != 0) + && (strcasecmp(role, "AffectedElement") != 0) + && (strcasecmp(role, "ConformantStandard") != 0) + && (strcasecmp(role, "ManagedElement") != 0) + && (strcasecmp(role, "Antecedent") != 0) + && (strcasecmp(role, "Dependent") != 0)) { + CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, + "Invalid value for role ."); + return rc; + } + if (resultRole && (strcasecmp(resultRole, "AffectingElement") != 0) + && (strcasecmp(resultRole, "AffectedElement") != 0) + && (strcasecmp(resultRole, "ConformantStandard") != 0) + && (strcasecmp(resultRole, "ManagedElement") != 0) + && (strcasecmp(resultRole, "Antecedent") != 0) + && (strcasecmp(resultRole, "Dependent") != 0)) { + CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, + "Invalid value for resultRole ."); + return rc; + } + + saeop = + CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), + "SFCB_ServiceAffectsElement", &rc); + hsop = + CMNewObjectPath(_broker, "root/interop", "CIM_HostedService", &rc); + nimop = + CMNewObjectPath(_broker, "root/interop", "CIM_NamespaceInManager", &rc); + ecpop = + CMNewObjectPath(_broker, "root/interop", + "SFCB_ElementConformsToProfile", &rc); + if ((saeop == NULL) || (hsop == NULL) || (ecpop == NULL)) { + CMSetStatusWithChars(_broker, &rc, CMPI_RC_ERR_FAILED, + "Create CMPIObjectPath failed."); + return rc; + } + /* Make sure we are getting a request for the right assoc class */ + /* Handle SFCB_ServiceAffectsElement */ + if ((assocClass == NULL) + || (CMClassPathIsA(_broker, saeop, assocClass, &rc) == 1)) { + rc = handleAssocSAE(mi, ctx, rslt, cop, resultClass, role, resultRole, propertyList, target, saeop); + if (rc.rc) return rc; + } + + /* Handle CIM_HostedService */ + if ((assocClass == NULL) + || (CMClassPathIsA(_broker, hsop, assocClass, &rc) == 1)) { + rc = handleAssocHostedService(mi, ctx, rslt, cop, resultClass, role, resultRole, propertyList, target, hsop); + if (rc.rc) return rc; + } + /* Handle CIM_NamespaceInManager */ + if ((assocClass == NULL) + || (CMClassPathIsA(_broker, nimop, assocClass, &rc) == 1)) { + rc = handleAssocNIM(mi, ctx, rslt, cop, resultClass, role, resultRole, propertyList, target, nimop); + if (rc.rc) return rc; + } + /* Handle ElementConformstoProfile */ + if (((assocClass == NULL) + || (CMClassPathIsA(_broker, ecpop, assocClass, &rc) == 1)) + && (CMClassPathIsA(_broker, cop, "cim_indicationservice", &rc) == 1)) { + rc = handleAssocElementConforms(mi, ctx, rslt, cop, resultClass, role, resultRole, propertyList, target, ecpop); + if (rc.rc) return rc; } CMReturnDone(rslt); hooks/post-receive -- SFCB - Small Footprint CIM Broker |