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...> - 2012-03-13 15:46:31
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util In directory vz-cvs-3.sog:/tmp/cvs-serv22131/src/org/sblim/cimclient/internal/util Modified Files: WBEMConfiguration.java WBEMConfigurationDefaults.java Log Message: 3492224 - Need two different timeouts for Socket connections Index: WBEMConfigurationDefaults.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util/WBEMConfigurationDefaults.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- WBEMConfigurationDefaults.java 13 Mar 2012 15:27:45 -0000 1.28 +++ WBEMConfigurationDefaults.java 13 Mar 2012 15:46:28 -0000 1.29 @@ -33,6 +33,7 @@ * 3206904 2011-05-03 blaschke-oss Indication listener deadlock causes JVM to run out sockets * 3459036 2011-12-13 blaschke-oss Linked list for RI queue not efficient for many LDs * 3492214 2012-02-23 blaschke-oss Add a SenderIPAddress property indications + * 3492224 2012-02-23 blaschke-oss Need two different timeouts for Socket connections */ package org.sblim.cimclient.internal.util; @@ -204,6 +205,11 @@ public static final String SOCKET_CONNECT_WITH_TIMEOUT = "true"; /** + * SOCKET_CONNECT_TIMEOUT + */ + public static final String SOCKET_CONNECT_TIMEOUT = "0"; + + /** * KEY_CREDENTIALS_DEFAULT_ENABLED */ public static final String KEY_CREDENTIALS_DEFAULT_ENABLED = "false"; Index: WBEMConfiguration.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util/WBEMConfiguration.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- WBEMConfiguration.java 13 Mar 2012 15:27:45 -0000 1.40 +++ WBEMConfiguration.java 13 Mar 2012 15:46:28 -0000 1.41 @@ -38,6 +38,7 @@ * 3459036 2011-12-13 blaschke-oss Linked list for RI queue not efficient for many LDs * 3485074 2012-02-06 blaschke-oss An Indication trace request * 3492214 2012-02-23 blaschke-oss Add a SenderIPAddress property indications + * 3492224 2012-02-23 blaschke-oss Need two different timeouts for Socket connections */ package org.sblim.cimclient.internal.util; @@ -785,6 +786,16 @@ } /** + * Returns the socket connect timeout + * + * @return The socket connect timeout + */ + public int getSocketConnectTimeout() { + return Integer.parseInt(getProperty(WBEMConfigurationProperties.SOCKET_CONNECT_TIMEOUT, + WBEMConfigurationDefaults.SOCKET_CONNECT_TIMEOUT)); + } + + /** * isDefaultAuthorizationEnabled * * @return true if default authorization is enabled |
From: Dave B. <bla...@us...> - 2012-03-13 15:27:48
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv20436 Modified Files: NEWS sblim-cim-client2.properties Log Message: 3492214 - Add a SenderIPAddress property indications Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.258 retrieving revision 1.259 diff -u -d -r1.258 -r1.259 --- NEWS 13 Mar 2012 15:05:36 -0000 1.258 +++ NEWS 13 Mar 2012 15:27:45 -0000 1.259 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3492214 Add a SenderIPAddress property indications 3492246 Rename new indication trace property 3490355 TCK: Cannot instantiate WBEMClientFactory 3490032 TCK: WBEMException must validate error ID Index: sblim-cim-client2.properties =================================================================== RCS file: /cvsroot/sblim/jsr48-client/sblim-cim-client2.properties,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- sblim-cim-client2.properties 13 Mar 2012 15:05:37 -0000 1.25 +++ sblim-cim-client2.properties 13 Mar 2012 15:27:46 -0000 1.26 @@ -668,4 +668,18 @@ # Recognition: On next creation of WBEMListener # Format: [class:]property[,property]* # -#sblim.wbem.listenerIndicationTraceFilter= \ No newline at end of file +#sblim.wbem.listenerIndicationTraceFilter= + +# If set to true, a property will be added to all indications that identifies +# the sender's IP address. If set to false, the property will not be added. +# +# The property is a CIMProperty with: +# name = "SBLIMJCC_SenderIPAddress" +# type = CIMDataType.STRING_T +# value = String returned by InetAddress.getHostAddress() (i.e. 1.2.3.4) +# +# Type: Boolean +# Recognition: On next creation of a WBEMListener +# Default: false +# +#sblim.wbem.listenerAddSenderIPAddress=false \ No newline at end of file |
From: Dave B. <bla...@us...> - 2012-03-13 15:27:47
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util In directory vz-cvs-3.sog:/tmp/cvs-serv20436/src/org/sblim/cimclient/internal/util Modified Files: WBEMConfiguration.java WBEMConfigurationDefaults.java Log Message: 3492214 - Add a SenderIPAddress property indications Index: WBEMConfigurationDefaults.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util/WBEMConfigurationDefaults.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- WBEMConfigurationDefaults.java 15 Dec 2011 12:27:49 -0000 1.27 +++ WBEMConfigurationDefaults.java 13 Mar 2012 15:27:45 -0000 1.28 @@ -1,7 +1,7 @@ /** * WBEMConfigurationDefaults.java * - * (C) Copyright IBM Corp. 2006, 2011 + * (C) Copyright IBM Corp. 2006, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -32,6 +32,7 @@ * 3195069 2011-02-28 blaschke-oss Need support to disable SSL Handshake * 3206904 2011-05-03 blaschke-oss Indication listener deadlock causes JVM to run out sockets * 3459036 2011-12-13 blaschke-oss Linked list for RI queue not efficient for many LDs + * 3492214 2012-02-23 blaschke-oss Add a SenderIPAddress property indications */ package org.sblim.cimclient.internal.util; @@ -268,6 +269,11 @@ public static final String LISTENER_RELIABLE_INDICATION_HASHTABLE_CAPACITY = "0"; /** + * LISTENER_ADD_SENDER_IP_ADDRESS + */ + public static final String LISTENER_ADD_SENDER_IP_ADDRESS = "false"; + + /** * SSL_DEFAULT_PROTOCOL */ public static final String SSL_DEF_PROTOCOL = "SSL"; Index: WBEMConfiguration.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util/WBEMConfiguration.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- WBEMConfiguration.java 20 Feb 2012 18:59:36 -0000 1.39 +++ WBEMConfiguration.java 13 Mar 2012 15:27:45 -0000 1.40 @@ -37,6 +37,7 @@ * 3206904 2011-05-03 blaschke-oss Indication listener deadlock causes JVM to run out sockets * 3459036 2011-12-13 blaschke-oss Linked list for RI queue not efficient for many LDs * 3485074 2012-02-06 blaschke-oss An Indication trace request + * 3492214 2012-02-23 blaschke-oss Add a SenderIPAddress property indications */ package org.sblim.cimclient.internal.util; @@ -955,4 +956,16 @@ public String getListenerIndicationTraceFilter() { return getProperty(WBEMConfigurationProperties.LISTENER_INDICATION_TRACE_FILTER, null); } + + /** + * Returns whether sender IP property should be added to indications + * + * @return <code>true</code> if sender IP property should be added to + * indications, <code>false</code> otherwise + */ + public boolean getListenerAddSenderIPAddress() { + return Boolean.valueOf( + getProperty(WBEMConfigurationProperties.LISTENER_ADD_SENDER_IP_ADDRESS, + WBEMConfigurationDefaults.LISTENER_ADD_SENDER_IP_ADDRESS)).booleanValue(); + } } |
From: Chris B. <buc...@us...> - 2012-03-13 15:10:52
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv20071 Modified Files: httpAdapter.c ChangeLog Log Message: [ 3367363 ] Add CMPI Role Support Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- httpAdapter.c 12 Mar 2012 22:30:52 -0000 1.101 +++ httpAdapter.c 13 Mar 2012 15:10:49 -0000 1.102 @@ -957,7 +957,7 @@ } } #endif - AuthExtras extras = {NULL, NULL, NULL}; + AuthExtras extras = {NULL, NULL, NULL, NULL}; if (!authorized && !discardInput && doBa) { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.741 retrieving revision 1.742 diff -u -d -r1.741 -r1.742 --- ChangeLog 12 Mar 2012 22:30:52 -0000 1.741 +++ ChangeLog 13 Mar 2012 15:10:49 -0000 1.742 @@ -1,3 +1,8 @@ +2012-03-13 Chris Buccella <buc...@li...> + + * httpAdapter.c: + [ 3367363 ] Add CMPIRole Support (init Role to NULL) + 2012-03-12 Chris Buccella <buc...@li...> * brokerUpc.c, cimXmlOps.y, cimXmlParser.h, cimXmlRequest.c, |
From: Dave B. <bla...@us...> - 2012-03-13 15:05:39
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv19836 Modified Files: NEWS sblim-cim-client2.properties Log Message: 3492246 - Rename new indication trace property Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.257 retrieving revision 1.258 diff -u -d -r1.257 -r1.258 --- NEWS 13 Mar 2012 14:47:04 -0000 1.257 +++ NEWS 13 Mar 2012 15:05:36 -0000 1.258 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3492246 Rename new indication trace property 3490355 TCK: Cannot instantiate WBEMClientFactory 3490032 TCK: WBEMException must validate error ID 3490009 TCK: Too many WBEMListenerFactory class methods Index: sblim-cim-client2.properties =================================================================== RCS file: /cvsroot/sblim/jsr48-client/sblim-cim-client2.properties,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- sblim-cim-client2.properties 20 Feb 2012 18:59:36 -0000 1.24 +++ sblim-cim-client2.properties 13 Mar 2012 15:05:37 -0000 1.25 @@ -668,4 +668,4 @@ # Recognition: On next creation of WBEMListener # Format: [class:]property[,property]* # -#sblim.wbem.listener.IndicationTraceFilter= \ No newline at end of file +#sblim.wbem.listenerIndicationTraceFilter= \ No newline at end of file |
From: Dave B. <bla...@us...> - 2012-03-13 14:47:06
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv17833 Modified Files: NEWS Log Message: 3490355 - TCK: Cannot instantiate WBEMClientFactory Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.256 retrieving revision 1.257 diff -u -d -r1.256 -r1.257 --- NEWS 13 Mar 2012 14:41:14 -0000 1.256 +++ NEWS 13 Mar 2012 14:47:04 -0000 1.257 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3490355 TCK: Cannot instantiate WBEMClientFactory 3490032 TCK: WBEMException must validate error ID 3490009 TCK: Too many WBEMListenerFactory class methods 3484022 Turn reliable indication mode on and off based on SC/SN |
From: Dave B. <bla...@us...> - 2012-03-13 14:41:16
|
Update of /cvsroot/sblim/jsr48-client/src/javax/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv17641/src/javax/wbem Modified Files: WBEMException.java Log Message: 3490032 - TCK: WBEMException must validate error ID Index: WBEMException.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/wbem/WBEMException.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- WBEMException.java 11 Mar 2010 15:08:41 -0000 1.12 +++ WBEMException.java 13 Mar 2012 14:41:14 -0000 1.13 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -21,6 +21,7 @@ * 2958941 2010-02-25 blaschke-oss Sync up javax.wbem.* javadoc with JSR48 1.0.0 * 2958990 2010-02-25 blaschke-oss Remove WBEMException.CIM_ERR_TYPE_MISMATCH * 2959039 2010-02-25 blaschke-oss Fix WBEMException.toString() logic + * 3490032 2012-02-21 blaschke-oss TCK: WBEMException must validate error ID */ package javax.wbem; @@ -211,12 +212,12 @@ /* 10 */"CIM_ERR_INVALID_SUPERCLASS", /* 11 */"CIM_ERR_ALREADY_EXISTS", /* 12 */"CIM_ERR_NO_SUCH_PROPERTY", - /* 13 */"13", + /* 13 */null, /* 14 */"CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED", /* 15 */"CIM_ERR_INVALID_QUERY", /* 16 */"CIM_ERR_METHOD_NOT_AVAILABLE", /* 17 */"CIM_ERR_METHOD_NOT_FOUND", - /* 18 */"18", + /* 18 */null, /* 19 */"CIM_ERR_INVALID_RESPONSE_DESTINATION", /* 20 */"CIM_ERR_NAMESPACE_NOT_EMPTY", /* 21 */"CIM_ERR_INVALID_ENUMERATION_CONTEXT", @@ -285,6 +286,7 @@ */ public WBEMException(int pID, String pMessage, CIMInstance[] pErrors, Throwable pCause) { super(pMessage, pCause); + if (!isValidID(pID)) throw new IllegalArgumentException("Invalid error ID!"); this.iErrorID = pID; this.iCimErrors = pErrors; } @@ -346,7 +348,19 @@ * @return A <code>String</code> representation of the exception ID. */ private String getCIMMessage() { - return (this.iErrorID >= 0 && this.iErrorID < MESSAGES.length) ? MESSAGES[this.iErrorID] - : String.valueOf(this.iErrorID); + return isValidID(this.iErrorID) ? MESSAGES[this.iErrorID] : String.valueOf(this.iErrorID); + } + + /** + * Returns validity of error ID. + * + * @param pID + * The error ID. + * + * @return <code>true</code> if error ID is valid, <code>false</code> + * otherwise. + */ + private boolean isValidID(int pID) { + return pID >= 0 && pID < MESSAGES.length && MESSAGES[pID] != null; } } |
From: Dave B. <bla...@us...> - 2012-03-13 14:32:56
|
Update of /cvsroot/sblim/jsr48-client/src/javax/wbem/listener In directory vz-cvs-3.sog:/tmp/cvs-serv17458/src/javax/wbem/listener Modified Files: WBEMListenerFactory.java Log Message: 3490009 - TCK: Too many WBEMListenerFactory class methods Index: WBEMListenerFactory.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/wbem/listener/WBEMListenerFactory.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- WBEMListenerFactory.java 11 Mar 2010 15:29:31 -0000 1.10 +++ WBEMListenerFactory.java 13 Mar 2012 14:32:53 -0000 1.11 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -19,6 +19,7 @@ * 2798931 2009-06-01 raman_arora Fix spelling of getPROTOCOLS() * 2882448 2009-10-21 blaschke-oss Add WBEMClientConstants from JSR48 * 2959240 2010-02-25 blaschke-oss Sync up javax.listener.* javadoc with JSR48 1.0.0 + * 3490009 2012-02-21 blaschke-oss TCK: Too many WBEMListenerFactory class methods */ package javax.wbem.listener; @@ -75,18 +76,6 @@ } /** - * Get the names of the supported PROTOCOLS. - * - * @deprecated : Typo in method name, use getProtocols() instead - * - * @return A string array of the protocol names supported. - */ - @Deprecated - public static String[] getPROTOCOLS() { - return PROTOCOLS; - } - - /** * Get the names of the supported protocols. * * @return A string array of the protocol names supported. |
From: Chris B. <buc...@us...> - 2012-03-12 22:30:55
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv16335 Modified Files: ChangeLog NEWS sfcBasicPAMAuthentication.c providerMgr.h providerMgr.c providerDrv.c httpAdapter.c cimcClientSfcbLocal.c cimXmlRequest.h cimXmlRequest.c cimXmlParser.h cimXmlOps.y brokerUpc.c Log Message: [ 3367363 ] Add CMPIRole Support Index: sfcBasicPAMAuthentication.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBasicPAMAuthentication.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- sfcBasicPAMAuthentication.c 12 Mar 2012 19:20:18 -0000 1.4 +++ sfcBasicPAMAuthentication.c 12 Mar 2012 22:30:52 -0000 1.5 @@ -93,11 +93,14 @@ else { retval = 0; } - + /* for testing */ + // pam_putenv(pamh, "CMPIRole=54321"); + /* if we keep the handle around, it means we'll call pam_end() later */ if (extras) { extras->authHandle = pamh; extras->release = closePam; + extras->role = pam_getenv(pamh, "CMPIRole"); } else pam_end(pamh, rc); Index: providerMgr.h =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- providerMgr.h 5 Mar 2012 18:14:03 -0000 1.16 +++ providerMgr.h 12 Mar 2012 22:30:52 -0000 1.17 @@ -102,7 +102,7 @@ MsgSegment rvEnc; unsigned char rvValue,chunkedMode,moreChunks; unsigned long count; // maps to MsgList - MsgSegment object[1]; + MsgSegment object[1]; /* WARNING: brokerUpc references segments positionally! */ } BinResponseHdr; struct chunkFunctions; @@ -158,33 +158,43 @@ BinRequestHdr hdr; MsgSegment principal; MsgSegment objectPath; + MsgSegment userRole; MsgSegment properties[1]; } GetClassReq; +#define GC_REQ_REG_SEGMENTS 3 typedef struct enumClassNamesReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment objectPath; + MsgSegment userRole; } EnumClassNamesReq; +#define ECN_REQ_REG_SEGMENTS 3 typedef struct enumClassesReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment objectPath; + MsgSegment userRole; } EnumClassesReq; +#define EC_REQ_REG_SEGMENTS 3 typedef struct enumInstanceNamesReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment objectPath; + MsgSegment userRole; } EnumInstanceNamesReq; +#define EIN_REQ_REG_SEGMENTS 3 typedef struct enumInstancesReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment objectPath; + MsgSegment userRole; MsgSegment properties[1]; } EnumInstancesReq; +#define EI_REQ_REG_SEGMENTS 3 typedef struct execQueryReq { BinRequestHdr hdr; @@ -192,7 +202,9 @@ MsgSegment objectPath; MsgSegment query; MsgSegment queryLang; + MsgSegment userRole; } ExecQueryReq; +#define EQ_REQ_REG_SEGMENTS 5 typedef struct associatorsReq { BinRequestHdr hdr; @@ -202,8 +214,10 @@ MsgSegment role; MsgSegment assocClass; MsgSegment resultRole; + MsgSegment userRole; MsgSegment properties[1]; } AssociatorsReq; +#define AI_REQ_REG_SEGMENTS 7 typedef struct referencesReq { BinRequestHdr hdr; @@ -211,8 +225,10 @@ MsgSegment objectPath; MsgSegment resultClass; MsgSegment role; + MsgSegment userRole; MsgSegment properties[1]; } ReferencesReq; +#define RI_REQ_REG_SEGMENTS 5 typedef struct associatorNamesReq { BinRequestHdr hdr; @@ -222,7 +238,9 @@ MsgSegment role; MsgSegment assocClass; MsgSegment resultRole; + MsgSegment userRole; } AssociatorNamesReq; +#define AIN_REQ_REG_SEGMENTS 7 typedef struct referenceNamesReq { BinRequestHdr hdr; @@ -230,48 +248,62 @@ MsgSegment objectPath; MsgSegment resultClass; MsgSegment role; + MsgSegment userRole; } ReferenceNamesReq; +#define RIN_REQ_REG_SEGMENTS 5 typedef struct getInstanceReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment objectPath; + MsgSegment userRole; MsgSegment properties[1]; } GetInstanceReq; +#define GI_REQ_REG_SEGMENTS 3 typedef struct createClassReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment path; MsgSegment cls; + MsgSegment userRole; } CreateClassReq; +#define CC_REQ_REG_SEGMENTS 4 typedef struct createInstanceReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment path; MsgSegment instance; + MsgSegment userRole; } CreateInstanceReq; +#define CI_REQ_REG_SEGMENTS 4 typedef struct modifyInstanceReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment path; MsgSegment instance; + MsgSegment userRole; MsgSegment properties[1]; } ModifyInstanceReq; +#define MI_REQ_REG_SEGMENTS 4 typedef struct deleteInstanceReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment objectPath; + MsgSegment userRole; } DeleteInstanceReq; +#define DI_REQ_REG_SEGMENTS 3 typedef struct deleteClassReq { BinRequestHdr hdr; MsgSegment principal; MsgSegment objectPath; + MsgSegment userRole; } DeleteClassReq; +#define DC_REQ_REG_SEGMENTS 3 typedef struct invokeMethodReq { BinRequestHdr hdr; @@ -280,7 +312,9 @@ MsgSegment method; MsgSegment in; MsgSegment out; + MsgSegment userRole; } InvokeMethodReq; +#define IM_REQ_REG_SEGMENTS 6 typedef struct loadProviderReq { BinRequestHdr hdr; Index: cimXmlRequest.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- cimXmlRequest.c 30 Nov 2011 23:23:17 -0000 1.65 +++ cimXmlRequest.c 12 Mar 2012 22:30:52 -0000 1.66 @@ -688,11 +688,12 @@ if (req->properties) sreqSize+=req->properties*sizeof(MsgSegment); sreq=calloc(1,sreqSize); sreq->hdr.operation=OPS_GetClass; - sreq->hdr.count=req->properties+2; + sreq->hdr.count=req->properties+GC_REQ_REG_SEGMENTS; path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq->objectPath = setObjectPathMsgSegment(path); sreq->principal = setCharsMsgSegment(ctx->principal); + sreq->userRole = setCharsMsgSegment(ctx->role); sreq->hdr.sessionId=ctx->sessionId; for (i=0; i<req->properties; i++) @@ -760,6 +761,7 @@ path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq.objectPath = setObjectPathMsgSegment(path); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.sessionId=ctx->sessionId; binCtx.oHdr = (OperationHdr *) req; @@ -806,7 +808,7 @@ int irc; BinRequestContext binCtx; BinResponseHdr *resp; - CreateClassReq sreq = BINREQ(OPS_CreateClass, 3); + CreateClassReq sreq = BINREQ(OPS_CreateClass, CC_REQ_REG_SEGMENTS); XtokProperty *p = NULL; XtokProperties *ps = NULL; @@ -923,6 +925,7 @@ cls=initConstClass(cl); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.path = setObjectPathMsgSegment(path); sreq.cls = setConstClassMsgSegment(&cls); sreq.hdr.sessionId=ctx->sessionId; @@ -965,7 +968,7 @@ RequestHdr * hdr) { CMPIObjectPath *path; - EnumClassNamesReq sreq = BINREQ(OPS_EnumerateClassNames, 2); + EnumClassNamesReq sreq = BINREQ(OPS_EnumerateClassNames, ECN_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -980,6 +983,7 @@ path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq.objectPath = setObjectPathMsgSegment(path); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.flags = req->flags; sreq.hdr.sessionId=ctx->sessionId; @@ -1020,7 +1024,7 @@ RequestHdr * hdr) { CMPIObjectPath *path; - EnumClassesReq sreq = BINREQ(OPS_EnumerateClasses, 2); + EnumClassesReq sreq = BINREQ(OPS_EnumerateClasses, EC_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -1034,6 +1038,7 @@ path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq.objectPath = setObjectPathMsgSegment(path); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.flags = req->flags; sreq.hdr.sessionId=ctx->sessionId; @@ -1100,7 +1105,7 @@ BinRequestContext binCtx; BinResponseHdr *resp; RespSegments rsegs; - GetInstanceReq *sreq; + GetInstanceReq *sreq=NULL; memset(&binCtx,0,sizeof(BinRequestContext)); XtokGetInstance *req = (XtokGetInstance *) hdr->cimRequest; @@ -1109,7 +1114,7 @@ if (req->properties) sreqSize+=req->properties*sizeof(MsgSegment); sreq=calloc(1,sreqSize); sreq->hdr.operation=OPS_GetInstance; - sreq->hdr.count=req->properties+2; + sreq->hdr.count=req->properties+GI_REQ_REG_SEGMENTS; path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); for (i = 0, m = req->instanceName.bindings.next; i < m; i++) { @@ -1121,6 +1126,7 @@ } sreq->objectPath = setObjectPathMsgSegment(path); sreq->principal = setCharsMsgSegment(ctx->principal); + sreq->userRole = setCharsMsgSegment(ctx->role); sreq->hdr.sessionId=ctx->sessionId; for (i=0; i<req->properties; i++) @@ -1177,7 +1183,7 @@ int irc, i, m; BinRequestContext binCtx; BinResponseHdr *resp; - DeleteInstanceReq sreq = BINREQ(OPS_DeleteInstance, 2); + DeleteInstanceReq sreq = BINREQ(OPS_DeleteInstance, DI_REQ_REG_SEGMENTS); memset(&binCtx,0,sizeof(BinRequestContext)); XtokDeleteInstance *req = (XtokDeleteInstance *) hdr->cimRequest; @@ -1194,6 +1200,7 @@ } sreq.objectPath = setObjectPathMsgSegment(path); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.sessionId=ctx->sessionId; binCtx.oHdr = (OperationHdr *) req; @@ -1240,7 +1247,7 @@ int irc; BinRequestContext binCtx; BinResponseHdr *resp; - CreateInstanceReq sreq = BINREQ(OPS_CreateInstance, 3); + CreateInstanceReq sreq = BINREQ(OPS_CreateInstance, CI_REQ_REG_SEGMENTS); XtokProperty *p = NULL; CMPIStatus rc = {CMPI_RC_OK, NULL}; @@ -1260,6 +1267,7 @@ sreq.instance = setInstanceMsgSegment(inst); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.sessionId=ctx->sessionId; path = inst->ft->getObjectPath(inst,&st); @@ -1328,7 +1336,7 @@ if (req->properties) sreqSize+=req->properties*sizeof(MsgSegment); sreq=calloc(1,sreqSize); sreq->hdr.operation=OPS_ModifyInstance; - sreq->hdr.count=req->properties+3; + sreq->hdr.count=req->properties+MI_REQ_REG_SEGMENTS; for (i=0; i<req->properties; i++){ sreq->properties[i]=setCharsMsgSegment(req->propertyList.values[i].value); @@ -1360,6 +1368,7 @@ sreq->instance = setInstanceMsgSegment(inst); sreq->path = setObjectPathMsgSegment(path); sreq->principal = setCharsMsgSegment(ctx->principal); + sreq->userRole = setCharsMsgSegment(ctx->role); sreq->hdr.sessionId=ctx->sessionId; binCtx.oHdr = (OperationHdr *) req; @@ -1404,7 +1413,7 @@ { _SFCB_ENTER(TRACE_CIMXMLPROC, "enumInstanceNames"); CMPIObjectPath *path; - EnumInstanceNamesReq sreq = BINREQ(OPS_EnumerateInstanceNames, 2); + EnumInstanceNamesReq sreq = BINREQ(OPS_EnumerateInstanceNames, EIN_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -1418,6 +1427,7 @@ path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq.objectPath = setObjectPathMsgSegment(path); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.sessionId=ctx->sessionId; binCtx.oHdr = (OperationHdr *) req; @@ -1472,11 +1482,12 @@ if (req->properties) sreqSize+=req->properties*sizeof(MsgSegment); sreq=calloc(1,sreqSize); sreq->hdr.operation=OPS_EnumerateInstances; - sreq->hdr.count=req->properties+2; + sreq->hdr.count=req->properties+EI_REQ_REG_SEGMENTS; path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); sreq->principal = setCharsMsgSegment(ctx->principal); sreq->objectPath = setObjectPathMsgSegment(path); + sreq->userRole = setCharsMsgSegment(ctx->role); sreq->hdr.sessionId=ctx->sessionId; for (i=0; i<req->properties; i++) { @@ -1571,6 +1582,7 @@ sreq.objectPath = setObjectPathMsgSegment(path); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.query = setCharsMsgSegment((char*)req->op.query.data); sreq.queryLang = setCharsMsgSegment((char*)req->op.queryLang.data); sreq.hdr.sessionId=ctx->sessionId; @@ -1633,7 +1645,7 @@ { _SFCB_ENTER(TRACE_CIMXMLPROC, "associatorNames"); CMPIObjectPath *path; - AssociatorNamesReq sreq = BINREQ(OPS_AssociatorNames, 6); + AssociatorNamesReq sreq = BINREQ(OPS_AssociatorNames, AIN_REQ_REG_SEGMENTS); int irc, i, m, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -1670,6 +1682,7 @@ sreq.assocClass = req->op.assocClass; sreq.resultRole = req->op.resultRole; sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.sessionId=ctx->sessionId; req->op.className = req->op.assocClass; @@ -1728,7 +1741,7 @@ if (req->properties) sreqSize+=req->properties*sizeof(MsgSegment); sreq=calloc(1,sreqSize); sreq->hdr.operation=OPS_Associators; - sreq->hdr.count=req->properties+6; + sreq->hdr.count=req->properties+AI_REQ_REG_SEGMENTS; path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); for (i = 0, m = req->objectName.bindings.next; i < m; i++) { @@ -1759,6 +1772,7 @@ sreq->resultRole = req->op.resultRole; sreq->hdr.flags = req->flags; sreq->principal = setCharsMsgSegment(ctx->principal); + sreq->userRole = setCharsMsgSegment(ctx->role); sreq->hdr.sessionId=ctx->sessionId; for (i=0; i<req->properties; i++) @@ -1825,7 +1839,7 @@ { _SFCB_ENTER(TRACE_CIMXMLPROC, "referenceNames"); CMPIObjectPath *path; - ReferenceNamesReq sreq = BINREQ(OPS_ReferenceNames, 4); + ReferenceNamesReq sreq = BINREQ(OPS_ReferenceNames, RIN_REQ_REG_SEGMENTS); int irc, i, m, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -1860,6 +1874,7 @@ sreq.resultClass = req->op.resultClass; sreq.role = req->op.role; sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.sessionId=ctx->sessionId; req->op.className = req->op.resultClass; @@ -1919,7 +1934,7 @@ if (req->properties) sreqSize+=req->properties*sizeof(MsgSegment); sreq=calloc(1,sreqSize); sreq->hdr.operation=OPS_References; - sreq->hdr.count=req->properties+4; + sreq->hdr.count=req->properties+RI_REQ_REG_SEGMENTS; path = TrackedCMPIObjectPath(req->op.nameSpace.data, req->op.className.data, NULL); for (i = 0, m = req->objectName.bindings.next; i < m; i++) { @@ -1948,6 +1963,7 @@ sreq->role = req->op.role; sreq->hdr.flags = req->flags; sreq->principal = setCharsMsgSegment(ctx->principal); + sreq->userRole = setCharsMsgSegment(ctx->role); sreq->hdr.sessionId=ctx->sessionId; for (i=0; i<req->properties; i++) @@ -2122,6 +2138,7 @@ } sreq.objectPath = setObjectPathMsgSegment(path); sreq.principal = setCharsMsgSegment(ctx->principal); + sreq.userRole = setCharsMsgSegment(ctx->role); sreq.hdr.sessionId=ctx->sessionId; if (getControlBool("validateMethodParamTypes", &vmpt)) @@ -2714,6 +2731,7 @@ #endif hdr = scanCimXmlRequest(ctx->cimXmlDoc); + hdr.role=ctx->role; #ifdef SFCB_DEBUG if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.740 retrieving revision 1.741 diff -u -d -r1.740 -r1.741 --- ChangeLog 12 Mar 2012 19:20:18 -0000 1.740 +++ ChangeLog 12 Mar 2012 22:30:52 -0000 1.741 @@ -1,5 +1,10 @@ 2012-03-12 Chris Buccella <buc...@li...> + * brokerUpc.c, cimXmlOps.y, cimXmlParser.h, cimXmlRequest.c, + cimXmlRequest.h, cimcClientSfcbLocal.c, httpAdapter.c, providerDrv.c, + providerMgr.c, providerMgr.h, sfcBasicPAMAuthentication.c: + [ 3367363 ] Add CMPIRole Support + * httpAdapter.c, sfcBasicPAMAuthentication.c: [ 3367361 ] Allow for releasing auth handle after CIM request completes Index: cimXmlOps.y =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlOps.y,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- cimXmlOps.y 5 Jun 2009 20:18:10 -0000 1.31 +++ cimXmlOps.y 12 Mar 2012 22:30:52 -0000 1.32 @@ -646,7 +646,7 @@ methodCall : localClassPath { - $$.op.count = 2; + $$.op.count = IM_REQ_REG_SEGMENTS; $$.op.type = OPS_InvokeMethod; $$.op.nameSpace=setCharsMsgSegment($1.path); $$.op.className=setCharsMsgSegment($1.className); @@ -658,7 +658,7 @@ } | localClassPath paramValues { - $$.op.count = 2; + $$.op.count = IM_REQ_REG_SEGMENTS; $$.op.type = OPS_InvokeMethod; $$.op.nameSpace=setCharsMsgSegment($1.path); $$.op.className=setCharsMsgSegment($1.className); @@ -669,7 +669,7 @@ } | localInstancePath { - $$.op.count = 2; + $$.op.count = IM_REQ_REG_SEGMENTS; $$.op.type = OPS_InvokeMethod; $$.op.nameSpace=setCharsMsgSegment($1.path); $$.op.className=setCharsMsgSegment($1.instanceName.className); @@ -682,7 +682,7 @@ } | localInstancePath paramValues { - $$.op.count = 2; + $$.op.count = IM_REQ_REG_SEGMENTS; $$.op.type = OPS_InvokeMethod; $$.op.nameSpace=setCharsMsgSegment($1.path); $$.op.className=setCharsMsgSegment($1.instanceName.className); @@ -965,7 +965,7 @@ getClass : localNameSpacePath { - $$.op.count = 2; + $$.op.count = GC_REQ_REG_SEGMENTS; $$.op.type = OPS_GetClass; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -978,7 +978,7 @@ } | localNameSpacePath getClassParmsList { - $$.op.count = 2; + $$.op.count = GC_REQ_REG_SEGMENTS; $$.op.type = OPS_GetClass; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.className); @@ -1079,7 +1079,7 @@ enumClassNames : localNameSpacePath { - $$.op.count = 2; + $$.op.count = ECN_REQ_REG_SEGMENTS; $$.op.type = OPS_EnumerateClassNames; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1089,12 +1089,11 @@ } | localNameSpacePath enumClassNamesParmsList { - $$.op.count = 2; + $$.op.count = ECN_REQ_REG_SEGMENTS; $$.op.type = OPS_EnumerateClassNames; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.className); $$.flags = $2.flags; - setRequest(parm,&$$,sizeof(XtokEnumClassNames),OPS_EnumerateClassNames); } ; @@ -1143,7 +1142,7 @@ enumClasses : localNameSpacePath { - $$.op.count = 2; + $$.op.count = EC_REQ_REG_SEGMENTS; $$.op.type = OPS_EnumerateClasses; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1153,7 +1152,7 @@ } | localNameSpacePath enumClassesParmsList { - $$.op.count = 2; + $$.op.count = EC_REQ_REG_SEGMENTS; $$.op.type = OPS_EnumerateClasses; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.className); @@ -1237,7 +1236,7 @@ getInstance : localNameSpacePath { - $$.op.count = 2; + $$.op.count = GI_REQ_REG_SEGMENTS; $$.op.type = OPS_GetInstance; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1245,12 +1244,13 @@ $$.propertyList.values = NULL; $$.properties=0; $$.instNameSet = 0; + //$$.userRole=setCharsMsgSegment($$.op.role); setRequest(parm,&$$,sizeof(XtokGetInstance),OPS_GetInstance); } | localNameSpacePath getInstanceParmsList { - $$.op.count = 2; + $$.op.count = GI_REQ_REG_SEGMENTS; $$.op.type = OPS_GetInstance; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.instanceName.className); @@ -1353,7 +1353,7 @@ createClass : localNameSpacePath { - $$.op.count = 3; + $$.op.count = CC_REQ_REG_SEGMENTS; $$.op.type = OPS_CreateClass; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1363,7 +1363,7 @@ } | localNameSpacePath createClassParm { - $$.op.count = 3; + $$.op.count = CC_REQ_REG_SEGMENTS; $$.op.type = OPS_CreateClass; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.cls.className); @@ -1390,7 +1390,7 @@ createInstance : localNameSpacePath { - $$.op.count = 2; + $$.op.count = CI_REQ_REG_SEGMENTS; $$.op.type = OPS_CreateInstance; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1399,7 +1399,7 @@ } | localNameSpacePath createInstanceParm { - $$.op.count = 2; + $$.op.count = CI_REQ_REG_SEGMENTS; $$.op.type = OPS_CreateInstance; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.instance.className); @@ -1425,7 +1425,7 @@ modifyInstance : localNameSpacePath { - $$.op.count = 2; + $$.op.count = MI_REQ_REG_SEGMENTS; $$.op.type = OPS_ModifyInstance; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1437,7 +1437,7 @@ } | localNameSpacePath modifyInstanceParmsList { - $$.op.count = 2; + $$.op.count = MI_REQ_REG_SEGMENTS; $$.op.type = OPS_ModifyInstance; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.namedInstance.path.className); @@ -1517,7 +1517,7 @@ deleteClass : localNameSpacePath { - $$.op.count = 2; + $$.op.count = DC_REQ_REG_SEGMENTS; $$.op.type = OPS_DeleteClass; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1526,7 +1526,7 @@ } | localNameSpacePath deleteClassParm { - $$.op.count = 2; + $$.op.count = DC_REQ_REG_SEGMENTS; $$.op.type = OPS_DeleteClass; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.className); @@ -1552,7 +1552,7 @@ deleteInstance : localNameSpacePath { - $$.op.count = 2; + $$.op.count = DI_REQ_REG_SEGMENTS; $$.op.type = OPS_DeleteInstance; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1561,7 +1561,7 @@ } | localNameSpacePath deleteInstanceParm { - $$.op.count = 2; + $$.op.count = DI_REQ_REG_SEGMENTS; $$.op.type = OPS_DeleteInstance; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.instanceName.className); @@ -1588,7 +1588,7 @@ enumInstanceNames : localNameSpacePath XTOK_IP_CLASSNAME className ZTOK_IPARAMVALUE { - $$.op.count = 2; + $$.op.count = EIN_REQ_REG_SEGMENTS; $$.op.type = OPS_EnumerateInstanceNames; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($3); @@ -1606,7 +1606,7 @@ enumInstances : localNameSpacePath { - $$.op.count = 2; + $$.op.count = EI_REQ_REG_SEGMENTS; $$.op.type = OPS_EnumerateInstances; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1618,7 +1618,7 @@ } | localNameSpacePath enumInstancesParmsList { - $$.op.count = 2; + $$.op.count = EI_REQ_REG_SEGMENTS; $$.op.type = OPS_EnumerateInstances; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.className); @@ -1734,7 +1734,7 @@ XTOK_IP_QUERY value ZTOK_IPARAMVALUE XTOK_IP_QUERYLANG value ZTOK_IPARAMVALUE { - $$.op.count = 3; + $$.op.count = EQ_REQ_REG_SEGMENTS; $$.op.type = OPS_ExecQuery; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.query=setCharsMsgSegment($3.value); @@ -1746,7 +1746,7 @@ XTOK_IP_QUERYLANG value ZTOK_IPARAMVALUE XTOK_IP_QUERY value ZTOK_IPARAMVALUE { - $$.op.count = 3; + $$.op.count = EQ_REQ_REG_SEGMENTS; $$.op.type = OPS_ExecQuery; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.query=setCharsMsgSegment($6.value); @@ -1765,7 +1765,7 @@ associators : localNameSpacePath { - $$.op.count = 6; + $$.op.count = AI_REQ_REG_SEGMENTS; $$.op.type = OPS_Associators; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1782,7 +1782,7 @@ } | localNameSpacePath associatorsParmsList { - $$.op.count = 6; + $$.op.count = AI_REQ_REG_SEGMENTS; $$.op.type = OPS_Associators; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.objectName.className); @@ -1945,7 +1945,7 @@ references : localNameSpacePath { - $$.op.count = 4; + $$.op.count = RI_REQ_REG_SEGMENTS; $$.op.type = OPS_References; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -1960,7 +1960,7 @@ } | localNameSpacePath referencesParmsList { - $$.op.count = 4; + $$.op.count = RI_REQ_REG_SEGMENTS; $$.op.type = OPS_References; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.objectName.className); @@ -2091,7 +2091,7 @@ associatorNames : localNameSpacePath { - $$.op.count = 6; + $$.op.count = AIN_REQ_REG_SEGMENTS; $$.op.type = OPS_AssociatorNames; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -2105,7 +2105,7 @@ } | localNameSpacePath associatorNamesParmsList { - $$.op.count = 6; + $$.op.count = AIN_REQ_REG_SEGMENTS; $$.op.type = OPS_AssociatorNames; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.objectName.className); @@ -2203,7 +2203,7 @@ referenceNames : localNameSpacePath { - $$.op.count = 4; + $$.op.count = RIN_REQ_REG_SEGMENTS; $$.op.type = OPS_ReferenceNames; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment(NULL); @@ -2215,7 +2215,7 @@ } | localNameSpacePath referenceNamesParmsList { - $$.op.count = 4; + $$.op.count = RIN_REQ_REG_SEGMENTS; $$.op.type = OPS_ReferenceNames; $$.op.nameSpace=setCharsMsgSegment($1); $$.op.className=setCharsMsgSegment($2.objectName.className); Index: cimXmlRequest.h =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- cimXmlRequest.h 8 Jun 2011 22:00:12 -0000 1.7 +++ cimXmlRequest.h 12 Mar 2012 22:30:52 -0000 1.8 @@ -53,6 +53,7 @@ char *host; int teTrailers; unsigned int sessionId; + const char *role; unsigned long cimXmlDocLength; struct commHndl *commHndl; struct chunkFunctions *chunkFncs; Index: providerMgr.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- providerMgr.c 7 Mar 2012 00:52:36 -0000 1.80 +++ providerMgr.c 12 Mar 2012 22:30:52 -0000 1.81 @@ -1424,7 +1424,7 @@ CMPIObjectPath *path; CMPIConstClass *ccl; CMPIStatus rc; - GetClassReq sreq = BINREQ(OPS_GetClass,2); + GetClassReq sreq = BINREQ(OPS_GetClass,GC_REQ_REG_SEGMENTS); BinResponseHdr *resp=NULL; BinRequestContext binCtx; OperationHdr req = { OPS_GetClass, 2 }; @@ -1435,6 +1435,7 @@ path = TrackedCMPIObjectPath(ns, cn, &rc); sreq.principal = setCharsMsgSegment("$$"); sreq.objectPath = setObjectPathMsgSegment(path); + sreq.userRole = setCharsMsgSegment(NULL); req.nameSpace = setCharsMsgSegment((char *) ns); req.className = setCharsMsgSegment((char *) cn); @@ -1483,7 +1484,7 @@ CMPIObjectPath *path; CMPIConstClass *ccl = NULL; - GetClassReq sreq = BINREQ(OPS_GetClass, 2); + GetClassReq sreq = BINREQ(OPS_GetClass, GC_REQ_REG_SEGMENTS); BinResponseHdr *resp; BinRequestContext binCtx; OperationHdr req = { OPS_GetClass, 2 }; @@ -1492,6 +1493,7 @@ path = NewCMPIObjectPath(ns, cn, st); sreq.objectPath = setObjectPathMsgSegment(path); sreq.principal = setCharsMsgSegment("$$"); + sreq.userRole = setCharsMsgSegment(NULL); req.nameSpace = setCharsMsgSegment((char *) ns); req.className = setCharsMsgSegment((char *) cn); @@ -1537,7 +1539,7 @@ { _SFCB_ENTER(TRACE_PROVIDERMGR, "localInvokeMethod"); - InvokeMethodReq sreq = BINREQ(OPS_InvokeMethod, 5); + InvokeMethodReq sreq = BINREQ(OPS_InvokeMethod, IM_REQ_REG_SEGMENTS); OperationHdr req = { OPS_InvokeMethod, 1 }; CMPIData data = { 0, CMPI_nullValue, {0} }; if (out) *out=NULL; /* out is used by getchildren and getassocs */ @@ -1548,6 +1550,7 @@ sreq.objectPath = setObjectPathMsgSegment(path); sreq.method = setCharsMsgSegment(method); sreq.principal = setCharsMsgSegment("$$"); + sreq.userRole = setCharsMsgSegment(NULL); binCtx->oHdr = &req; binCtx->bHdr = &sreq.hdr; Index: cimXmlParser.h =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlParser.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- cimXmlParser.h 21 Dec 2007 16:04:48 -0000 1.14 +++ cimXmlParser.h 12 Mar 2012 22:30:52 -0000 1.15 @@ -90,6 +90,7 @@ unsigned long cimRequestLength; char *errMsg; char *className; + const char *role; } RequestHdr; Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- httpAdapter.c 12 Mar 2012 19:20:18 -0000 1.100 +++ httpAdapter.c 12 Mar 2012 22:30:52 -0000 1.101 @@ -1039,6 +1039,7 @@ ctx.cimXmlDoc = inBuf.content; ctx.principal = inBuf.principal; + ctx.role = extras.role; ctx.host = inBuf.host; ctx.teTrailers = inBuf.trailers; ctx.cimXmlDocLength = len - hl; Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.663 retrieving revision 1.664 diff -u -d -r1.663 -r1.664 --- NEWS 12 Mar 2012 19:20:18 -0000 1.663 +++ NEWS 12 Mar 2012 22:30:52 -0000 1.664 @@ -15,6 +15,7 @@ - 3495060 Verify filter and handler information during subscription - 3498932 Implement ModifyInstance for CIM_ListenerDestination - 3367361 Allow for releasing auth handle after CIM request completes +- 3367363 Add CMPIRole Support Bugs fixed: Index: brokerUpc.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerUpc.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- brokerUpc.c 8 Mar 2012 23:32:07 -0000 1.37 +++ brokerUpc.c 12 Mar 2012 22:30:52 -0000 1.38 @@ -586,7 +586,7 @@ { BinRequestContext binCtx; BinResponseHdr *resp; - CreateInstanceReq sreq = BINREQ(OPS_CreateInstance, 3); + CreateInstanceReq sreq = BINREQ(OPS_CreateInstance, CI_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_CreateInstance, 2 }; CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIObjectPath *op = NULL,*tOp=NULL; @@ -605,6 +605,7 @@ _SFCB_TRACE(1,("--- for %s %s",(char*)oHdr.nameSpace.data,(char*)oHdr.className.data)); sreq.instance = setInstanceMsgSegment(inst); + sreq.userRole = setCharsMsgSegment(NULL); checkReroute(broker, context, &oHdr); @@ -689,6 +690,7 @@ sreq=(ModifyInstanceReq*)calloc(1,sreqSize); sreq->hdr.count=ps+3; sreq->hdr.operation=OPS_ModifyInstance; + sreq->userRole = setCharsMsgSegment(NULL); setContext(&binCtx, &oHdr, &sreq->hdr, sreqSize, context, cop, NULL, NULL); _SFCB_TRACE(1,("--- for %s %s",(char*)oHdr.nameSpace.data,(char*)oHdr.className.data)); @@ -746,7 +748,7 @@ { BinRequestContext binCtx; BinResponseHdr *resp; - DeleteInstanceReq sreq = BINREQ(OPS_DeleteInstance, 2); + DeleteInstanceReq sreq = BINREQ(OPS_DeleteInstance, DI_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_DeleteInstance, 2 }; CMPIStatus st = { CMPI_RC_OK, NULL }; int initrc = 0; @@ -762,6 +764,7 @@ setContext(&binCtx, &oHdr, &sreq.hdr, sizeof(sreq), context, cop, NULL, NULL); _SFCB_TRACE(1,("--- for %s %s",(char*)oHdr.nameSpace.data,(char*)oHdr.className.data)); + sreq.userRole = setCharsMsgSegment(NULL); checkReroute(broker, context, &oHdr); @@ -811,7 +814,7 @@ const char *lang, CMPIStatus * rc) { BinRequestContext binCtx; - ExecQueryReq sreq = BINREQ(OPS_ExecQuery, 4); + ExecQueryReq sreq = BINREQ(OPS_ExecQuery, EQ_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_ExecQuery, 2 }; CMPIStatus st = { CMPI_RC_OK, NULL },rci = { CMPI_RC_OK, NULL}; CMPIEnumeration *enm = NULL; @@ -831,6 +834,7 @@ sreq.query = setCharsMsgSegment(query); sreq.queryLang = setCharsMsgSegment(lang); + sreq.userRole = setCharsMsgSegment(NULL); irc = getProviderContext(&binCtx, &oHdr); @@ -897,8 +901,9 @@ const CMPIObjectPath * cop, const char **props, CMPIStatus * rc) { - EnumInstancesReq sreq = BINREQ(OPS_EnumerateInstances, 2); + EnumInstancesReq sreq = BINREQ(OPS_EnumerateInstances, EI_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_EnumerateInstances, 2 }; + sreq.userRole = setCharsMsgSegment(NULL); return genericEnumRequest(broker, context, cop, props, NULL, NULL, NULL, NULL, OPS_EnumerateInstances, &sreq.hdr, &oHdr, @@ -909,8 +914,9 @@ const CMPIContext * context, const CMPIObjectPath * cop, CMPIStatus * rc) { - EnumInstanceNamesReq sreq = BINREQ(OPS_EnumerateInstanceNames, 2); + EnumInstanceNamesReq sreq = BINREQ(OPS_EnumerateInstanceNames, EIN_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_EnumerateInstanceNames, 2 }; + sreq.userRole = setCharsMsgSegment(NULL); return genericEnumRequest(broker, context, cop, NULL, NULL, NULL, NULL, NULL, OPS_EnumerateInstanceNames, &sreq.hdr, &oHdr, @@ -934,13 +940,14 @@ const char *resultrole, const char **props, CMPIStatus * rc) { - AssociatorsReq sreq = BINREQ(OPS_Associators, 6); + AssociatorsReq sreq = BINREQ(OPS_Associators, AI_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_Associators, 6 }; sreq.resultClass = setCharsMsgSegment(resultclass); sreq.role = setCharsMsgSegment(role); sreq.assocClass = setCharsMsgSegment(assocclass); sreq.resultRole = setCharsMsgSegment(resultrole); + sreq.userRole = setCharsMsgSegment(NULL); return genericEnumRequest(broker, context, cop, props, assocclass, resultclass, role, resultrole, OPS_Associators, @@ -956,13 +963,14 @@ const char *role, const char *resultrole, CMPIStatus * rc) { - AssociatorNamesReq sreq = BINREQ(OPS_AssociatorNames, 6); + AssociatorNamesReq sreq = BINREQ(OPS_AssociatorNames, AIN_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_AssociatorNames, 6 }; sreq.resultClass = setCharsMsgSegment(resultclass); sreq.role = setCharsMsgSegment(role); sreq.assocClass = setCharsMsgSegment(assocclass); sreq.resultRole = setCharsMsgSegment(resultrole); + sreq.userRole = setCharsMsgSegment(NULL); return genericEnumRequest(broker, context, cop, NULL, assocclass, resultclass, role, resultrole, OPS_AssociatorNames, &sreq.hdr, &oHdr, @@ -976,11 +984,12 @@ const char *role, const char **props, CMPIStatus * rc) { - ReferencesReq sreq = BINREQ(OPS_References, 4); + ReferencesReq sreq = BINREQ(OPS_References, RI_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_References, 4 }; sreq.role = setCharsMsgSegment(role); sreq.resultClass = setCharsMsgSegment(resultclass); + sreq.userRole = setCharsMsgSegment(NULL); return genericEnumRequest(broker, context, cop, props, NULL, resultclass, role, NULL, OPS_References, @@ -993,11 +1002,12 @@ const char *resultclass, const char *role, CMPIStatus * rc) { - ReferenceNamesReq sreq = BINREQ(OPS_ReferenceNames, 4); + ReferenceNamesReq sreq = BINREQ(OPS_ReferenceNames, RIN_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_ReferenceNames, 4 }; sreq.role = setCharsMsgSegment(role); sreq.resultClass = setCharsMsgSegment(resultclass); + sreq.userRole = setCharsMsgSegment(NULL); return genericEnumRequest(broker, context, cop, NULL, NULL, resultclass, role, NULL, OPS_ReferenceNames, &sreq.hdr, &oHdr, @@ -1045,7 +1055,7 @@ size=sizeof(InvokeMethodReq)+(x*sizeof(MsgSegment)); sreq=(InvokeMethodReq*)calloc(1,size); - sreq->hdr.count=5+x; + sreq->hdr.count=IM_REQ_REG_SEGMENTS+x; sreq->hdr.operation=OPS_InvokeMethod; lockUpCall(broker); @@ -1055,8 +1065,10 @@ sreq->in = setArgsMsgSegment(in); sreq->out = setArgsMsgSegment(NULL); sreq->method = setCharsMsgSegment(method); + sreq->userRole = setCharsMsgSegment(NULL); + - if (x) for (n=5,i=0,s=CMGetArgCount(in,NULL); i<s; i++) { + if (x) for (n=IM_REQ_REG_SEGMENTS,i=0,s=CMGetArgCount(in,NULL); i<s; i++) { CMPIData d=CMGetArgAt(in,i,NULL,NULL); BinRequestHdr *req=(BinRequestHdr*)sreq; if (d.type==CMPI_instance) { Index: cimcClientSfcbLocal.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimcClientSfcbLocal.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- cimcClientSfcbLocal.c 17 Feb 2012 22:54:59 -0000 1.44 +++ cimcClientSfcbLocal.c 12 Mar 2012 22:30:52 -0000 1.45 @@ -315,7 +315,7 @@ CMPIStatus * rc) { _SFCB_ENTER(TRACE_CIMXMLPROC, "enumInstanceNames"); - EnumInstanceNamesReq sreq = BINREQ(OPS_EnumerateInstanceNames, 2); + EnumInstanceNamesReq sreq = BINREQ(OPS_EnumerateInstanceNames, EIN_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -334,6 +334,7 @@ sreq.objectPath = setObjectPathMsgSegment(cop); sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); + sreq.userRole = setCharsMsgSegment(NULL); binCtx.oHdr = (OperationHdr *) &oHdr; binCtx.bHdr = &sreq.hdr; @@ -554,7 +555,7 @@ int irc; BinRequestContext binCtx; BinResponseHdr *resp; - CreateInstanceReq sreq = BINREQ(OPS_CreateInstance, 3); + CreateInstanceReq sreq = BINREQ(OPS_CreateInstance, CI_REQ_REG_SEGMENTS); CMPIObjectPath *path; OperationHdr oHdr={OPS_CreateInstance,0,3}; @@ -572,6 +573,7 @@ sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); sreq.path = setObjectPathMsgSegment(cop); + sreq.userRole = setCharsMsgSegment(NULL); sreq.instance = setInstanceMsgSegment(inst); binCtx.oHdr = (OperationHdr *) &oHdr; @@ -701,7 +703,7 @@ int irc; BinRequestContext binCtx; BinResponseHdr *resp; - DeleteInstanceReq sreq = BINREQ(OPS_DeleteInstance, 2); + DeleteInstanceReq sreq = BINREQ(OPS_DeleteInstance, DI_REQ_REG_SEGMENTS); OperationHdr oHdr={OPS_DeleteInstance,0,2}; CMPIStatus rc={0,NULL}; @@ -717,6 +719,7 @@ sreq.objectPath = setObjectPathMsgSegment(cop); sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); + sreq.userRole = setCharsMsgSegment(NULL); binCtx.oHdr = (OperationHdr *) &oHdr; binCtx.bHdr = &sreq.hdr; @@ -761,7 +764,7 @@ const char * lang, CMPIStatus * rc) { - ExecQueryReq sreq = BINREQ(OPS_ExecQuery, 4); + ExecQueryReq sreq = BINREQ(OPS_ExecQuery, EQ_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -804,6 +807,7 @@ sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); sreq.query = setCharsMsgSegment(query); sreq.queryLang = setCharsMsgSegment(lang); + sreq.userRole = setCharsMsgSegment(NULL); binCtx.oHdr = (OperationHdr *) &oHdr; binCtx.bHdr = &sreq.hdr; @@ -1040,7 +1044,7 @@ const char * resultRole, CMPIStatus * rc) { - AssociatorNamesReq sreq = BINREQ(OPS_AssociatorNames, 6); + AssociatorNamesReq sreq = BINREQ(OPS_AssociatorNames, AIN_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -1062,6 +1066,7 @@ sreq.assocClass = setCharsMsgSegment(assocClass); sreq.resultRole = setCharsMsgSegment(resultRole); sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); + sreq.userRole = setCharsMsgSegment(NULL); oHdr.nameSpace=setCharsMsgSegment((char*)ns->hdl); oHdr.className = sreq.assocClass; @@ -1112,7 +1117,7 @@ const char * role, CMPIStatus * rc) { - ReferenceNamesReq sreq = BINREQ(OPS_ReferenceNames, 4); + ReferenceNamesReq sreq = BINREQ(OPS_ReferenceNames, RIN_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -1131,6 +1136,7 @@ sreq.resultClass = setCharsMsgSegment(resultClass); sreq.role = setCharsMsgSegment(role); sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); + sreq.userRole = setCharsMsgSegment(NULL); oHdr.className = sreq.resultClass; oHdr.nameSpace=setCharsMsgSegment((char*)ns->hdl); @@ -1432,7 +1438,7 @@ CMPIArgs * out, CMPIStatus * rc) { - InvokeMethodReq sreq = BINREQ(OPS_InvokeMethod, 5); + InvokeMethodReq sreq = BINREQ(OPS_InvokeMethod, IM_REQ_REG_SEGMENTS); int irc, i, outc; BinResponseHdr *resp; BinRequestContext binCtx; @@ -1467,6 +1473,7 @@ sreq.in = setArgsMsgSegment(argsin); sreq.out = setArgsMsgSegment(NULL); sreq.method = setCharsMsgSegment(method); + sreq.userRole = setCharsMsgSegment(NULL); binCtx.oHdr = (OperationHdr *) &oHdr; binCtx.bHdr = &sreq.hdr; @@ -1643,7 +1650,7 @@ CMPIFlags flags, CMPIStatus * rc) { - EnumClassNamesReq sreq = BINREQ(OPS_EnumerateClassNames, 2); + EnumClassNamesReq sreq = BINREQ(OPS_EnumerateClassNames, ECN_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -1665,6 +1672,7 @@ sreq.objectPath = setObjectPathMsgSegment(cop); sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); sreq.hdr.flags = flags; + sreq.userRole = setCharsMsgSegment(NULL); binCtx.oHdr = (OperationHdr*) &oHdr; binCtx.bHdr = &sreq.hdr; @@ -1711,7 +1719,7 @@ CMPIFlags flags, CMPIStatus * rc) { - EnumClassesReq sreq = BINREQ(OPS_EnumerateClasses, 2); + EnumClassesReq sreq = BINREQ(OPS_EnumerateClasses, EC_REQ_REG_SEGMENTS); int irc, l = 0, err = 0; BinResponseHdr **resp; BinRequestContext binCtx; @@ -1733,6 +1741,7 @@ sreq.objectPath = setObjectPathMsgSegment(cop); sreq.principal = setCharsMsgSegment(((ClientEnc*)mb)->data.user); sreq.hdr.flags = flags; + sreq.userRole = setCharsMsgSegment(NULL); binCtx.oHdr = (OperationHdr*)&oHdr; binCtx.bHdr = &sreq.hdr; Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- providerDrv.c 7 Mar 2012 00:52:36 -0000 1.109 +++ providerDrv.c 12 Mar 2012 22:30:52 -0000 1.110 @@ -1173,6 +1173,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -1218,8 +1219,10 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); - if (req->hdr.count>2) props=makePropertyList(req->hdr.count-2,req->properties); + if (req->hdr.count>GC_REQ_REG_SEGMENTS) + props=makePropertyList(req->hdr.count - GC_REQ_REG_SEGMENTS,req->properties); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -1261,6 +1264,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -1299,6 +1303,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); @@ -1344,6 +1349,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); @@ -1640,14 +1646,15 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); if (info->parms) ctx->ft->addEntry(ctx,"sfcbProviderParameters",(CMPIValue*)info->parms,CMPI_chars); - if (req->hdr.count>5) { + if (req->hdr.count>IM_REQ_REG_SEGMENTS) { int i,s,n; CMPIString *name; in=CMNewArgs(Broker,NULL); BinRequestHdr *r=(BinRequestHdr*)req; - for (n=5,i=0,s=CMGetArgCount(tIn,NULL); i<s; i++) { + for (n=IM_REQ_REG_SEGMENTS,i=0,s=CMGetArgCount(tIn,NULL); i<s; i++) { CMPIData d=CMGetArgAt(tIn,i,&name,NULL); if (d.type==CMPI_instance) { d.value.inst=relocateSerializedInstance(r->object[n++].data); @@ -1709,8 +1716,10 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); - if (req->hdr.count>2) props=makePropertyList(req->hdr.count-2,req->properties); + if (req->hdr.count>GI_REQ_REG_SEGMENTS) + props=makePropertyList(req->hdr.count-GI_REQ_REG_SEGMENTS,req->properties); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -1759,6 +1768,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -1798,6 +1808,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -1843,8 +1854,10 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); - if (req->hdr.count>3) props=makePropertyList(req->hdr.count-3,req->properties); + if (req->hdr.count>MI_REQ_REG_SEGMENTS) + props=makePropertyList(req->hdr.count-MI_REQ_REG_SEGMENTS,req->properties); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -1891,8 +1904,10 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); - if (req->hdr.count>2) props=makePropertyList(req->hdr.count-2,req->properties); + if (req->hdr.count>EI_REQ_REG_SEGMENTS) + props=makePropertyList(req->hdr.count-EI_REQ_REG_SEGMENTS,req->properties); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -1930,6 +1945,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -2023,6 +2039,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -2113,8 +2130,10 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); - if (req->hdr.count>6) props=makePropertyList(req->hdr.count-6,req->properties); + if (req->hdr.count>AI_REQ_REG_SEGMENTS) + props=makePropertyList(req->hdr.count-AI_REQ_REG_SEGMENTS,req->properties); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -2156,8 +2175,10 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); - if (req->hdr.count>4) props=makePropertyList(req->hdr.count-4,req->properties); + if (req->hdr.count>RI_REQ_REG_SEGMENTS) + props=makePropertyList(req->hdr.count-RI_REQ_REG_SEGMENTS,req->properties); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -2194,6 +2215,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) @@ -2231,6 +2253,7 @@ ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); ctx->ft->addEntry(ctx,"CMPISessionId",(CMPIValue*)&hdr->sessionId,CMPI_uint32); + ctx->ft->addEntry(ctx, CMPIRole, (CMPIValue *) req->userRole.data, CMPI_chars); _SFCB_TRACE(1, ("--- Calling provider %s",info->providerName)); TIMING_START(hdr,info) |
From: Chris B. <buc...@us...> - 2012-03-12 19:25:23
|
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 e6677b03ffce1d4745422d158a2a18dc348a8520 (commit) from 9f7a510022cb5291179a4f678bf3d1a41c46295f (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 e6677b03ffce1d4745422d158a2a18dc348a8520 Author: buccella <buc...@li...> Date: Mon Mar 12 15:25:09 2012 -0400 [ 3367361 ] Allow for releasing auth handle after CIM request completes ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index ea43e22..e72c481 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-12 Chris Buccella <buc...@li...> + + * httpAdapter.c, sfcBasicPAMAuthentication.c: + [ 3367361 ] Allow for releasing auth handle after CIM request completes + 2012-03-10 Chris Buccella <buc...@li...> * httpAdapter.c: diff --git a/NEWS b/NEWS index f83ec4e..7ef94e2 100644 --- a/NEWS +++ b/NEWS @@ -97,6 +97,7 @@ New Features: - 3440300 Allow forced chunked responses - 3367333 New entry point for authentication library - 3367332 RHOST Support for PAM +- 3367361 Allow for releasing auth handle after CIM request completes Bugs Fixed: diff --git a/httpAdapter.c b/httpAdapter.c index 7ec86ce..5a4a6c5 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -1199,6 +1199,10 @@ doHttpRequest(CommHndl conn_fd) if (response.buffer != NULL) cleanupCimXmlRequest(&response); + if (extras.release) { + extras.release(extras.authHandle); + } + #ifdef SFCB_DEBUG if (uset && (_sfcb_trace_mask & TRACE_RESPONSETIMING)) { gettimeofday(&ev, NULL); diff --git a/sfcBasicPAMAuthentication.c b/sfcBasicPAMAuthentication.c index 4b2ba80..5904b66 100644 --- a/sfcBasicPAMAuthentication.c +++ b/sfcBasicPAMAuthentication.c @@ -59,6 +59,11 @@ sfcBasicConv(int num_msg, const struct pam_message **msg, return PAM_CONV_ERR; } +void closePam(pam_handle_t* handle) { + int rc = PAM_SUCCESS; + pam_end(handle, rc); +} + static int _sfcBasicAuthenticateRemote(char *user, char *pw, AuthExtras *extras) { @@ -94,7 +99,13 @@ _sfcBasicAuthenticateRemote(char *user, char *pw, AuthExtras *extras) retval = 0; } - pam_end(pamh, rc); + /* if we keep the handle around, it means we'll call pam_end() later */ + if (extras) { + extras->authHandle = pamh; + extras->release = closePam; + } + else + pam_end(pamh, rc); return retval; } hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-03-12 19:20:20
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv17924 Modified Files: httpAdapter.c sfcBasicPAMAuthentication.c ChangeLog NEWS Log Message: [ 3367361 ] Allow for releasing auth handle after CIM request completes Index: sfcBasicPAMAuthentication.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBasicPAMAuthentication.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sfcBasicPAMAuthentication.c 22 Nov 2011 20:58:18 -0000 1.3 +++ sfcBasicPAMAuthentication.c 12 Mar 2012 19:20:18 -0000 1.4 @@ -57,6 +57,10 @@ return PAM_CONV_ERR; } +void closePam(pam_handle_t* handle) { + int rc = PAM_SUCCESS; + pam_end(handle, rc); +} static int _sfcBasicAuthenticateRemote(char *user, char *pw, AuthExtras *extras) { @@ -90,7 +94,13 @@ retval = 0; } - pam_end(pamh, rc); + /* if we keep the handle around, it means we'll call pam_end() later */ + if (extras) { + extras->authHandle = pamh; + extras->release = closePam; + } + else + pam_end(pamh, rc); return retval; } Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.662 retrieving revision 1.663 diff -u -d -r1.662 -r1.663 --- NEWS 8 Mar 2012 23:32:28 -0000 1.662 +++ NEWS 12 Mar 2012 19:20:18 -0000 1.663 @@ -14,6 +14,7 @@ - 3493493 Add sfcbsem - 3495060 Verify filter and handler information during subscription - 3498932 Implement ModifyInstance for CIM_ListenerDestination +- 3367361 Allow for releasing auth handle after CIM request completes Bugs fixed: Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- httpAdapter.c 8 Mar 2012 03:10:29 -0000 1.99 +++ httpAdapter.c 12 Mar 2012 19:20:18 -0000 1.100 @@ -1076,6 +1076,10 @@ if (response.buffer != NULL) cleanupCimXmlRequest(&response); + if (extras.release) { + extras.release(extras.authHandle); + } + #ifdef SFCB_DEBUG if (uset && (_sfcb_trace_mask & TRACE_RESPONSETIMING) ) { gettimeofday(&ev,NULL); Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.739 retrieving revision 1.740 diff -u -d -r1.739 -r1.740 --- ChangeLog 8 Mar 2012 23:32:50 -0000 1.739 +++ ChangeLog 12 Mar 2012 19:20:18 -0000 1.740 @@ -1,3 +1,8 @@ +2012-03-12 Chris Buccella <buc...@li...> + + * httpAdapter.c, sfcBasicPAMAuthentication.c: + [ 3367361 ] Allow for releasing auth handle after CIM request completes + 2012-03-08 Narasimha Sharoff <nsh...@us...> * brokerUpc.c: |
From: Dave B. <bla...@us...> - 2012-03-10 22:55:33
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax In directory vz-cvs-3.sog:/tmp/cvs-serv3730/src/org/sblim/cimclient/internal/cimxml/sax Modified Files: Tag: Experimental NodeFactory.java Log Message: 3498482 - Red Hat: Possible XML Hash DoS in sblim Index: NodeFactory.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/NodeFactory.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -d -r1.1.2.5 -r1.1.2.6 --- NodeFactory.java 2 Sep 2009 20:25:52 -0000 1.1.2.5 +++ NodeFactory.java 10 Mar 2012 22:55:30 -0000 1.1.2.6 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -15,13 +15,15 @@ * 1720707 2007-05-17 ebak Conventional Node factory for CIM-XML SAX parser * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) - * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) + * 2531371 2009-02-10 raman_arora Upgrade client to JDK 1.5 (Phase 2) * 2845211 2009-08-27 raman_arora Pull Enumeration Feature (SAX Parser) + * 3498482 2012-03-09 blaschke-oss Red Hat: Possible XML Hash DoS in sblim */ package org.sblim.cimclient.internal.cimxml.sax; import java.util.HashMap; +import java.util.Random; import org.sblim.cimclient.internal.cimxml.sax.node.*; @@ -54,7 +56,7 @@ * equals comparisons (==). */ public static String getEnum(String pNodeName) { - return NODENAME_HASH.get(pNodeName); + return NODENAME_HASH.get(pNodeName + iRandomString); } private static HashMap<String, FactoryEntry> cParserMap; @@ -440,9 +442,25 @@ private static final HashMap<String, String> NODENAME_HASH = new HashMap<String, String>(); + private static String iRandomString; + private static void initNodeNameHash(String[] pEnumA) { + // Append 8-byte randomly-generated string to keys in HashMap to avert + // hash DoS + Random generator = new Random(System.currentTimeMillis()); + byte randomByte[] = new byte[1]; + StringBuilder randomString = new StringBuilder(); + while (randomString.length() < 8) { + generator.nextBytes(randomByte); + if (randomByte[0] > 0) { + char ch = (char) randomByte[0]; + if (!Character.isISOControl(ch)) randomString.append(ch); + } + } + iRandomString = randomString.toString(); + for (int i = 0; i < pEnumA.length; i++) - NODENAME_HASH.put(pEnumA[i], pEnumA[i]); + NODENAME_HASH.put(pEnumA[i] + iRandomString, pEnumA[i]); } static { |
From: Chris B. <buc...@us...> - 2012-03-10 05:03:53
|
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 9f7a510022cb5291179a4f678bf3d1a41c46295f (commit) from a2c74bc3e03bf961ef2c8dd26c3d977ef99a4b03 (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 9f7a510022cb5291179a4f678bf3d1a41c46295f Author: buccella <buc...@li...> Date: Sat Mar 10 00:03:44 2012 -0500 [ 3457460 ] PAM_RHOST set wrong ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 9d166ea..ea43e22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-03-10 Chris Buccella <buc...@li...> + * httpAdapter.c: + [ 3457460 ] PAM_RHOST set wrong + * httpAdapter.c, sfcBasicPAMAuthentication.c: [ 3367332 ] RHOST Support for PAM diff --git a/NEWS b/NEWS index f9815bf..f83ec4e 100644 --- a/NEWS +++ b/NEWS @@ -117,6 +117,7 @@ Bugs Fixed: - 3426027 cimAccountPassThrough does not set return code - 3492362 Problem with whitespace trimming if local connect only - 3499930 Check file repository writes +- 3457460 PAM_RHOST set wrong Changes in 1.3.13 ================= diff --git a/httpAdapter.c b/httpAdapter.c index 3df82b4..7ec86ce 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -1070,7 +1070,7 @@ doHttpRequest(CommHndl conn_fd) /* for PAM, client's IP address is used for host-based authentication */ struct sockaddr_storage from; socklen_t from_len = sizeof(from); - getsockname(conn_fd.socket, (struct sockaddr *)&from, &from_len); + getpeername(conn_fd.socket, (struct sockaddr *)&from, &from_len); #ifdef USE_INET6 char ipstr[INET6_ADDRSTRLEN] = {0}; #else hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-03-10 05:01:05
|
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 a2c74bc3e03bf961ef2c8dd26c3d977ef99a4b03 (commit) from 8a4d2ac5f2ec94bc0cac69926a18aa07152984b9 (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 a2c74bc3e03bf961ef2c8dd26c3d977ef99a4b03 Author: buccella <buc...@li...> Date: Sat Mar 10 00:00:52 2012 -0500 [ 3367332 ] RHOST Support for PAM ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 9544754..9d166ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-10 Chris Buccella <buc...@li...> + + * httpAdapter.c, sfcBasicPAMAuthentication.c: + [ 3367332 ] RHOST Support for PAM + 2012-03-09 Chris Buccella <buc...@li...> * httpAdapter.c, control.c, sfcb.cfg.pre.in: diff --git a/NEWS b/NEWS index 3fb9b19..f9815bf 100644 --- a/NEWS +++ b/NEWS @@ -96,6 +96,7 @@ New Features: - 3498932 Implement ModifyInstance for CIM_ListenerDestination - 3440300 Allow forced chunked responses - 3367333 New entry point for authentication library +- 3367332 RHOST Support for PAM Bugs Fixed: diff --git a/httpAdapter.c b/httpAdapter.c index a5a68d7..3df82b4 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -1066,6 +1066,20 @@ doHttpRequest(CommHndl conn_fd) if (!authorized && !discardInput && doBa) { if (inBuf.authorization) { + + /* for PAM, client's IP address is used for host-based authentication */ + struct sockaddr_storage from; + socklen_t from_len = sizeof(from); + getsockname(conn_fd.socket, (struct sockaddr *)&from, &from_len); +#ifdef USE_INET6 + char ipstr[INET6_ADDRSTRLEN] = {0}; +#else + char ipstr[INET_ADDRSTRLEN] = {0}; +#endif + if (getnameinfo((struct sockaddr*)&from, from_len, ipstr, sizeof(ipstr), NULL, 0, NI_NUMERICHOST) == 0) + extras.clientIp = ipstr; + // fprintf(stderr, "client is: %s\n", ipstr); + barc = baValidate(inBuf.authorization,&inBuf.principal,&extras); #ifdef ALLOW_UPDATE_EXPIRED_PW diff --git a/sfcBasicPAMAuthentication.c b/sfcBasicPAMAuthentication.c index 6ca11eb..4b2ba80 100644 --- a/sfcBasicPAMAuthentication.c +++ b/sfcBasicPAMAuthentication.c @@ -26,6 +26,15 @@ #define SFCB_PAM_APP "sfcb" +struct auth_extras { + void (*release)(pam_handle_t*); + char* clientIp; + void* authHandle; + const char* role; +}; +typedef struct auth_extras AuthExtras; + + static int sfcBasicConv(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *credentials) @@ -51,7 +60,7 @@ sfcBasicConv(int num_msg, const struct pam_message **msg, } static int -_sfcBasicAuthenticateRemote(char *user, char *pw, char *rhost) +_sfcBasicAuthenticateRemote(char *user, char *pw, AuthExtras *extras) { struct pam_conv sfcConvStruct = { sfcBasicConv, @@ -63,18 +72,15 @@ _sfcBasicAuthenticateRemote(char *user, char *pw, char *rhost) rc = pam_start(SFCB_PAM_APP, user, &sfcConvStruct, &pamh); + if (extras && extras->clientIp) { + pam_set_item(pamh, PAM_RHOST, extras->clientIp); + } + if (rc == PAM_SUCCESS) { rc = pam_authenticate(pamh, PAM_SILENT); } if (rc == PAM_SUCCESS) { - /* - * host based authentication not yet supported - needs client IP - * address extraction in httpAdapter - */ - if (rhost) { - pam_set_item(pamh, PAM_RHOST, rhost); - } rc = pam_acct_mgmt(pamh, PAM_SILENT); } @@ -98,6 +104,13 @@ _sfcBasicAuthenticate(char *user, char *pw) { return _sfcBasicAuthenticateRemote(user, pw, NULL); } + +int +_sfcBasicAuthenticate2(char *user, char *pw, AuthExtras *extras) +{ + return _sfcBasicAuthenticateRemote(user, pw, extras); +} + /* MODELINES */ /* DO NOT EDIT BELOW THIS COMMENT */ /* Modelines are added by 'make pretty' */ hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-03-10 04:45:15
|
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 8a4d2ac5f2ec94bc0cac69926a18aa07152984b9 (commit) from 7c4a2806905e2684394f33d4ffebd9fd72fd4b50 (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 8a4d2ac5f2ec94bc0cac69926a18aa07152984b9 Author: buccella <buc...@li...> Date: Fri Mar 9 23:44:33 2012 -0500 [ 3367333 ] New entry point for authentication library ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 3693efb..9544754 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-09 Chris Buccella <buc...@li...> + + * httpAdapter.c, control.c, sfcb.cfg.pre.in: + [ 3367333 ] New entry point for authentication library + 2012-03-08 Chris Buccella <buc...@li...> * fileRepository.c: diff --git a/NEWS b/NEWS index ab28e81..3fb9b19 100644 --- a/NEWS +++ b/NEWS @@ -95,6 +95,7 @@ New Features: - 3493493 Add sfcbsem - 3498932 Implement ModifyInstance for CIM_ListenerDestination - 3440300 Allow forced chunked responses +- 3367333 New entry point for authentication library Bugs Fixed: diff --git a/control.c b/control.c index 0c5f30f..d84810d 100644 --- a/control.c +++ b/control.c @@ -76,6 +76,7 @@ Control init[] = { #endif {"provProcs", 1, "32"}, {"basicAuthLib", 0, "sfcBasicAuthentication"}, + {"basicAuthEntry", 0, "_sfcBasicAuthenticate"}, {"doBasicAuth", 2, "false"}, {"doUdsAuth", 2, "false"}, diff --git a/httpAdapter.c b/httpAdapter.c index 4602878..a5a68d7 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -148,7 +148,16 @@ static unsigned int sessionId; extern char *opsName[]; char *nicname = NULL; /* Network Interface */ +struct auth_extras { + void* (*release)(void*); + char* clientIp; + void* authHandle; + const char* role; +}; +typedef struct auth_extras AuthExtras; + typedef int (*Authenticate) (char *principal, char *pwd); +typedef int (*Authenticate2) (char *principal, char *pwd, AuthExtras *extras); typedef struct _buffer { char *data, @@ -242,15 +251,17 @@ remProcCtl() * Return 1 on success, 0 on fail, -1 on expired */ int -baValidate(char *cred, char **principal) +baValidate(char *cred, char **principal, AuthExtras* extras) { char *auth, *pw = NULL; int i; static void *authLib = NULL; static Authenticate authenticate = NULL; + static Authenticate2 authenticate2=NULL; char dlName[512]; int ret = AUTH_FAIL; + char *entry; if (strncasecmp(cred, "basic ", 6)) return AUTH_FAIL; @@ -267,20 +278,27 @@ baValidate(char *cred, char **principal) char *ln; if (getControlChars("basicAuthlib", &ln) == 0) { libraryName(NULL, ln, dlName, 512); - if ((authLib = dlopen(dlName, RTLD_LAZY))) { - authenticate = dlsym(authLib, "_sfcBasicAuthenticate"); - } - } - if (authenticate == NULL) { - mlogf(M_ERROR, M_SHOW, "--- Authentication exit %s not found\n", - dlName); - ret = AUTH_FAIL; + if ((authLib = dlopen(dlName, RTLD_LAZY)) && (getControlChars("basicAuthEntry", &entry) == 0)) { + if (strcmp(entry, "_sfcBasicAuthenticate2") == 0) + authenticate2 = dlsym(authLib, entry); + else + authenticate = dlsym(authLib, entry); + } } } - if (authenticate) { + if (authenticate2 == NULL && authenticate == NULL) { + mlogf(M_ERROR, M_SHOW, "--- Authentication exit %s not found\n", + dlName); + ret = AUTH_FAIL; + } + else { *principal = strdup(auth); - ret = authenticate(auth, pw); + if (authenticate2) + ret = authenticate2(auth, pw, extras); + else + ret = authenticate(auth, pw); + if (ret == AUTH_PASS) ret = AUTH_PASS; else if (ret == AUTH_EXPIRED) ret = AUTH_EXPIRED; else ret = AUTH_FAIL; @@ -1043,9 +1061,13 @@ doHttpRequest(CommHndl conn_fd) } } #endif + + AuthExtras extras = {NULL, NULL, NULL}; + if (!authorized && !discardInput && doBa) { if (inBuf.authorization) { - barc = baValidate(inBuf.authorization,&inBuf.principal); + barc = baValidate(inBuf.authorization,&inBuf.principal,&extras); + #ifdef ALLOW_UPDATE_EXPIRED_PW if (barc == AUTH_EXPIRED) { hcrFlags |= HCR_EXPIRED_PW; diff --git a/sfcb.cfg.pre.in b/sfcb.cfg.pre.in index ac4ad1f..47a2acb 100644 --- a/sfcb.cfg.pre.in +++ b/sfcb.cfg.pre.in @@ -64,6 +64,11 @@ doBasicAuth: false ## Default is: sfcBasicAuthentication basicAuthLib: @SFCB_CONF_BASICAUTHLIB@ +## Name of the entry point into the authentication library +## The return code of this function will determine if auth passes or fails +## Default is: _sfcBasicAuthenticate +basicAuthEntry: _sfcBasicAuthenticate + ## Maximum time in seconds an sfcb HTTP process will wait for select. ## Default is 5 #selectTimeout: 5 hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-03-09 20:06:30
|
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 7c4a2806905e2684394f33d4ffebd9fd72fd4b50 (commit) from e59f10745266bb5513953f51e8cbd3135a7fb65d (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 7c4a2806905e2684394f33d4ffebd9fd72fd4b50 Author: buccella <buc...@li...> Date: Fri Mar 9 15:06:09 2012 -0500 updated HTTP and provider debugging sections ----------------------------------------------------------------------- Summary of changes: diff --git a/README b/README index 36ab75d..543b44e 100644 --- a/README +++ b/README @@ -932,35 +932,11 @@ process is spawned and enter an pause loop to allow you to attach to the process from the debugger. One attached, do the following to exit this pause loop and so be able to debug the normal execution of this process: - 1. set a breakpoint at the sleep(5) statement 2006 in providerDrv.c - 2. set the next instruction to the first statement after the - sleep loop (2009). - 3. set any other breakpoint that you desire for debugging and continue - -The following is the relevant code from providerDrv.c - -2932 if (once && debugMode && parms->req->operation != OPS_LoadProvider) for (;;) { -2933 fprintf(stdout,"-#- Pausing for provider: %s -pid: %d\n",name,currentProc); -2934 once=0; -2935 sleep(5); -2936 } -2937 -2938 if (parms->req->operation == OPS_LoadProvider || debugMode) { -2939 processProviderInvocationRequestsThread(parms); -2940 } -2941 else { -2942 pthread_create(&t, &tattr, (void *(*)(void *)) -2943 processProviderInvocationRequestsThread, (void *) parms); -2944 } - -[How pause class provider to attach debugger?] - + 1. set a breakpoint at the sleep(5) statement in httpAdapter.c + 2. set a breakpoint farther down the execution path + 3. breakout of the pause loop: set breakloop=1 -If the error(s) are determined to be in the SBLIM provider library, not the -sfcb itself, then you should enabled provider debug messages using the -SBLIM_TRACE environment variable and/or try attaching a runtime debugger to -the provider's process and set appropriate breakpoints. See Section 23 below -for more information about debugging providers. +Attaching to a provider process to degbug works similarly; see Sec. 23. 17. Class Repository @@ -1422,33 +1398,14 @@ process is spawned and enter a pause loop to allow you to attach to the process from the debugger. Once attached, do the following to exit the pause loop and so be able to debug the normal execution of the provider process: - 1. set a breakpoint at the sleep(5) statement at line 2459 in - providerDrv.c.and continue. - 2. set the value of the variable debug_break to 1 so that the pause - loop will be broken out of when line 2456 is executed. - 3. set any breakpoints you desire in the provider code and continue. + 1. set a breakpoint at the sleep(5) in providerDrv.c.and continue. + 2. set any breakpoints you desire in the provider code and continue. + 3. breakout of the pause loop: set debug_break=1 NOTE: Due to optimization, setting debug_break might not work. In this case sfcb will need to be built without optimizations by adding "CFLAGS=-g" when configuring sfcb. -The following is the relevant code from providerDrv.c - -2455 if (once && debugMode && parms->req->operation != OPS_LoadProvider) for (;;) { -2456 if (debug_break) break; -2457 fprintf(stdout,"-#- Pausing for provider: %s -pid: %d\n",name,currentProc); -2458 once=0; -2459 sleep(5); -2460 } -2461 -2462 if (parms->req->operation == OPS_LoadProvider || debugMode) { -2463 processProviderInvocationRequestsThread(parms); -2464 } -2465 else { -2466 pthread_create(&t, &tattr, (void *(*)(void *)) -2467 processProviderInvocationRequestsThread, (void *) parms); -2468 } - 24. wbemcli, sfcc and other CIM Clients ======================================= hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2012-03-08 23:32:53
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv1155 Modified Files: ChangeLog Log Message: [3497209] oom panic: out of memory using fsp indprovider Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.738 retrieving revision 1.739 diff -u -d -r1.738 -r1.739 --- ChangeLog 8 Mar 2012 21:20:27 -0000 1.738 +++ ChangeLog 8 Mar 2012 23:32:50 -0000 1.739 @@ -1,3 +1,8 @@ +2012-03-08 Narasimha Sharoff <nsh...@us...> + + * brokerUpc.c: + [ 3497209 ] oom panic: out of memory using fsp indprovider + 2012-03-08 Chris Buccella <buc...@li...> * fileRepository.c: |
From: Narasimha S. <nsh...@us...> - 2012-03-08 23:32:30
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv1139 Modified Files: NEWS Log Message: [3497209] oom panic: out of memory using fsp indprovider Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.661 retrieving revision 1.662 diff -u -d -r1.661 -r1.662 --- NEWS 8 Mar 2012 21:20:27 -0000 1.661 +++ NEWS 8 Mar 2012 23:32:28 -0000 1.662 @@ -52,6 +52,7 @@ - 3498719 Better SSL error reporting for sfcb - 3471814 segfault in objectImpl.c:131,ClObjectGetClString - 3499930 Check file repository writes +- 3497209 oom panic: out of memory using fsp indprovider Changes in 1.3.13 ================= |
From: Narasimha S. <nsh...@us...> - 2012-03-08 23:32:09
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv1109 Modified Files: brokerUpc.c Log Message: [3497209] oom panic: out of memory using fsp indprovider Index: brokerUpc.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerUpc.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- brokerUpc.c 1 Mar 2012 17:46:40 -0000 1.36 +++ brokerUpc.c 8 Mar 2012 23:32:07 -0000 1.37 @@ -121,6 +121,9 @@ NativeSelectExp *se=activFilters; while (se) { + + void *hc = markHeap(); /* 3497209:78376 */ + /* Check for matching FROM class */ for (x=0; x<se->qs->fcNext; x++) { if (CMClassPathIsA(mb, indop, se->qs->fClasses[x], &st)) { @@ -128,6 +131,9 @@ break; } } + + releaseHeap(hc); /* 3497209:78376 - relase objs that are no longer reqd */ + if (classMatch && se->exp.ft->evaluate(&se->exp,ind,&st)) { /*apply a propertyfilter in case the query is not "SELECT * FROM ..." */ if(se->qs->spNames && se->qs->spNames[0]) { @@ -145,6 +151,8 @@ #endif ); CBInvokeMethod(mb,ctx,op,"_deliver",in,NULL,&st); + CMRelease(op); /* 3497209 */ + CMRelease(in); } classMatch = 0; /* 3483200 */ se=se->next; |
From: Chris B. <buc...@us...> - 2012-03-08 22:14:47
|
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 e59f10745266bb5513953f51e8cbd3135a7fb65d (commit) from 727cf3bdd65a052d974edb2743b396b43f2eadd0 (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 e59f10745266bb5513953f51e8cbd3135a7fb65d Author: buccella <buc...@li...> Date: Thu Mar 8 17:14:32 2012 -0500 [ 3499930 ] Check file repository writes ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 47af6ea..3693efb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-03-08 Chris Buccella <buc...@li...> + * fileRepository.c: + [ 3499930 ] Check file repository writes + * httpAdapter.c, cimRequest.c, sfcBroker.c: [ 3440300 ] Allow forced chunked responses [ 3492362 ] Problem with whitespace trimming if local connect only diff --git a/NEWS b/NEWS index 10427f1..ab28e81 100644 --- a/NEWS +++ b/NEWS @@ -114,6 +114,7 @@ Bugs Fixed: - 3498275 Remove __Namespace - 3426027 cimAccountPassThrough does not set return code - 3492362 Problem with whitespace trimming if local connect only +- 3499930 Check file repository writes Changes in 1.3.13 ================= diff --git a/fileRepository.c b/fileRepository.c index c9b85f7..832e510 100644 --- a/fileRepository.c +++ b/fileRepository.c @@ -410,7 +410,8 @@ rebuild(BlobIndex * bi, const char *id, void *blob, int blen) int ofs, len, xt = 0, - dt = 0; + dt = 0, + rc = 0; unsigned long pos; char *xn = alloca(strlen(bi->dir) + 8); char *dn = alloca(strlen(bi->dir) + 8); @@ -433,21 +434,24 @@ rebuild(BlobIndex * bi, const char *id, void *blob, int blen) dt += len; pos = ftell(d); if (blen) - fwrite(blob, blen, 1, d); + rc = fwrite(blob,blen,1,d) - 1; dt += blen; - fclose(d); + rc += fclose(d); + if (rc != 0) return -1; + adjust(bi, bi->pos, bi->blen); ofs = bi->pos + bi->len; if (bi->pos) - fwrite(bi->index, bi->pos, 1, x); + rc += fwrite(bi->index, bi->pos, 1, x) - 1; xt += bi->pos; len = bi->dSize - ofs; if (len) - fwrite(bi->index + ofs, len, 1, x); + rc += fwrite(bi->index + ofs, len, 1, x) - 1; xt += len; - fclose(x); + rc += fclose(x); + if (rc != 0) return -1; remove(bi->fnd); remove(bi->fnx); @@ -547,9 +551,13 @@ addBlob(const char *ns, const char *cls, char *id, void *blob, int len) fdHandleError(bi); return -1; } - fwrite(blob, len, 1, bi->fd); - fclose(bi->fd); + rc = fwrite(blob,len,1,bi->fd) - 1; /* write the serialized instance */ + rc += fclose(bi->fd); bi->fd = NULL; + if (rc != 0) { + fdHandleError(bi); + return -1; + } es = sprintf(idxe, " %zd %s %d %d\r\n", strlen(id), id, len, 0); ep = sprintf(idxe, "%d", es); @@ -557,14 +565,18 @@ addBlob(const char *ns, const char *cls, char *id, void *blob, int len) memcpy(bi->index, idxe, es); bi->dSize = es; - fwrite(bi->index, bi->dSize, 1, bi->fx); - fclose(bi->fx); + rc = fwrite(bi->index,bi->dSize,1,bi->fx) - 1; /* write idx file */ + rc += fclose(bi->fx); bi->fx = NULL; + if (rc != 0) { + fdHandleError(bi); + return -1; + } } else { - if (indxLocate(bi, id)) { + if (indxLocate(bi,id)) { /* already have entries in the idx file; append */ bi->fd = fopen(bi->fnd, "rb"); if (bi->fd == NULL) { fdHandleError(bi); @@ -578,19 +590,23 @@ addBlob(const char *ns, const char *cls, char *id, void *blob, int len) idxe[ep] = ' '; memcpy(bi->index + bi->dSize, idxe, es); bi->dSize += es; - rebuild(bi, id, blob, len); + if (rebuild(bi,id,blob,len) != 0) { fdHandleError(bi); return -1; } } } - else { + else { /* first entry in the idx file */ bi->fd = fopen(bi->fnd, "ab+"); if (bi->fd == NULL) bi->fd = fopen(bi->fnd, "wb+"); fseek(bi->fd, 0, SEEK_END); bi->fpos = ftell(bi->fd); - fwrite(blob, len, 1, bi->fd); - fclose(bi->fd); + rc = fwrite(blob,len,1,bi->fd) - 1; + rc += fclose(bi->fd); bi->fd = NULL; + if (rc != 0) { + fdHandleError(bi); + return -1; + } es = sprintf(idxe, " %zd %s %d %lu\r\n", strlen(id), id, len, bi->fpos); @@ -600,8 +616,8 @@ addBlob(const char *ns, const char *cls, char *id, void *blob, int len) memcpy(bi->index + bi->dSize, idxe, es); bi->dSize += es; fseek(bi->fx, 0, SEEK_SET); - fwrite(bi->index, bi->dSize, 1, bi->fx); - fclose(bi->fx); + rc = fwrite(bi->index,bi->dSize,1,bi->fx) - 1; + rc += fclose(bi->fx); bi->fx = NULL; } } @@ -628,7 +644,7 @@ deleteBlob(const char *ns, const char *cls, const char *id) } else { fseek(bi->fd, 0, SEEK_END); bi->dlen = ftell(bi->fd); - rebuild(bi, id, NULL, 0); + if (rebuild(bi,id,NULL,0) != 0) { fdHandleError(bi); return -1; } freeBlobIndex(&bi, 1); return 0; } hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-03-08 21:20:30
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv22449 Modified Files: fileRepository.c ChangeLog NEWS Log Message: [ 3499930 ] Check file repository writes Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.660 retrieving revision 1.661 diff -u -d -r1.660 -r1.661 --- NEWS 8 Mar 2012 06:25:38 -0000 1.660 +++ NEWS 8 Mar 2012 21:20:27 -0000 1.661 @@ -51,6 +51,7 @@ - 3426027 cimAccountPassThrough does not set return code - 3498719 Better SSL error reporting for sfcb - 3471814 segfault in objectImpl.c:131,ClObjectGetClString +- 3499930 Check file repository writes Changes in 1.3.13 ================= Index: fileRepository.c =================================================================== RCS file: /cvsroot/sblim/sfcb/fileRepository.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- fileRepository.c 9 Nov 2009 21:03:30 -0000 1.20 +++ fileRepository.c 8 Mar 2012 21:20:27 -0000 1.21 @@ -308,7 +308,7 @@ static int rebuild(BlobIndex *bi, const char *id, void *blob, int blen) { - int ofs,len,xt=0,dt=0; + int ofs,len,xt=0,dt=0,rc=0; unsigned long pos; char *xn=alloca(strlen(bi->dir)+8); char *dn=alloca(strlen(bi->dir)+8); @@ -327,19 +327,24 @@ if (len) copy(d,bi->fd,bi->dlen-(bi->bofs+bi->blen),bi->bofs+bi->blen); dt+=len; pos=ftell(d); - if (blen) fwrite(blob,blen,1,d); + if (blen) + rc = fwrite(blob,blen,1,d) - 1; dt+=blen; - fclose(d); + rc += fclose(d); + if (rc != 0) return -1; adjust(bi,bi->pos,bi->blen); ofs=bi->pos+bi->len; - if (bi->pos) fwrite(bi->index,bi->pos,1,x); + if (bi->pos) + rc = fwrite(bi->index,bi->pos,1,x) - 1; xt+=bi->pos; len=bi->dSize-ofs; - if (len) fwrite(bi->index+ofs,len,1,x); + if (len) + rc += (fwrite(bi->index+ofs,len,1,x) - 1); xt+=len; - fclose(x); + rc += fclose(x); + if (rc != 0) return -1; remove(bi->fnd); remove(bi->fnx); @@ -419,9 +424,13 @@ if (bi->dSize==0) { bi->fd=fopen(bi->fnd,"wb"); if (bi->fd==NULL) { fdHandleError(bi); return -1; } - fwrite(blob,len,1,bi->fd); - fclose(bi->fd); + rc = fwrite(blob,len,1,bi->fd) - 1; /* write the serialized instance */ + rc += fclose(bi->fd); bi->fd=NULL; + if (rc != 0) { + fdHandleError(bi); + return -1; + } es=sprintf(idxe," %zd %s %d %d\r\n",strlen(id),id,len,0); ep=sprintf(idxe,"%d",es); @@ -429,14 +438,18 @@ memcpy(bi->index,idxe,es); bi->dSize=es; - fwrite(bi->index,bi->dSize,1,bi->fx); - fclose(bi->fx); + rc = fwrite(bi->index,bi->dSize,1,bi->fx) - 1; /* write idx file */ + rc += fclose(bi->fx); bi->fx=NULL; + if (rc != 0) { + fdHandleError(bi); + return -1; + } } else { - if (indxLocate(bi,id)) { + if (indxLocate(bi,id)) { /* already have entries in the idx file; append */ bi->fd=fopen(bi->fnd,"rb"); if (bi->fd==NULL) { fdHandleError(bi); return -1; } else { @@ -447,18 +460,22 @@ idxe[ep]=' '; memcpy(bi->index+bi->dSize,idxe,es); bi->dSize+=es; - rebuild(bi,id,blob,len); + if (rebuild(bi,id,blob,len) != 0) { fdHandleError(bi); return -1; } } } - else { + else { /* first entry in the idx file */ bi->fd=fopen(bi->fnd,"ab+"); if (bi->fd==NULL) bi->fd=fopen(bi->fnd,"wb+"); fseek(bi->fd,0,SEEK_END); bi->fpos=ftell(bi->fd); - fwrite(blob,len,1,bi->fd); - fclose(bi->fd); + rc = fwrite(blob,len,1,bi->fd) - 1; + rc += fclose(bi->fd); bi->fd=NULL; + if (rc != 0) { + fdHandleError(bi); + return -1; + } es=sprintf(idxe," %zd %s %d %lu\r\n",strlen(id),id,len,bi->fpos); ep=sprintf(idxe,"%d",es); @@ -467,9 +484,13 @@ memcpy(bi->index+bi->dSize,idxe,es); bi->dSize+=es; fseek(bi->fx,0,SEEK_SET); - fwrite(bi->index,bi->dSize,1,bi->fx); - fclose(bi->fx); + rc = fwrite(bi->index,bi->dSize,1,bi->fx) - 1; + rc += fclose(bi->fx); bi->fx=NULL; + if (rc != 0) { + fdHandleError(bi); + return -1; + } } } freeBlobIndex(&bi,1); @@ -491,7 +512,7 @@ else { fseek(bi->fd,0,SEEK_END); bi->dlen=ftell(bi->fd); - rebuild(bi,id,NULL,0); + if (rebuild(bi,id,NULL,0) != 0) { fdHandleError(bi); return -1; } freeBlobIndex(&bi,1); return 0; } Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.737 retrieving revision 1.738 diff -u -d -r1.737 -r1.738 --- ChangeLog 8 Mar 2012 06:25:58 -0000 1.737 +++ ChangeLog 8 Mar 2012 21:20:27 -0000 1.738 @@ -1,3 +1,8 @@ +2012-03-08 Chris Buccella <buc...@li...> + + * fileRepository.c: + [ 3499930 ] Check file repository writes + 2012-03-08 Narasimha Sharoff <nsh...@us...> * objectImpl.c: |
From: Chris B. <buc...@us...> - 2012-03-08 19:38:12
|
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 727cf3bdd65a052d974edb2743b396b43f2eadd0 (commit) via 8bfabeb46c06f2bd713ca1b9beb7fa0fb644eb60 (commit) from c5daa606337010b51fc2e6700be6db08fabd5c2f (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 727cf3bdd65a052d974edb2743b396b43f2eadd0 Merge: 8bfabeb c5daa60 Author: buccella <buc...@li...> Date: Thu Mar 8 14:37:59 2012 -0500 ChangeLog merge commit 8bfabeb46c06f2bd713ca1b9beb7fa0fb644eb60 Author: buccella <buc...@li...> Date: Thu Mar 8 14:36:19 2012 -0500 [ 3440300 ] Allow forced chunked responses [ 3492362 ] Problem with whitespace trimming if local connect only ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 44c8b6c..47af6ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-03-08 Chris Buccella <buc...@li...> + + * httpAdapter.c, cimRequest.c, sfcBroker.c: + [ 3440300 ] Allow forced chunked responses + [ 3492362 ] Problem with whitespace trimming if local connect only + 2012-03-07 Dave Heller <hel...@us...> * httpAdapter.c: diff --git a/NEWS b/NEWS index ba548c8..10427f1 100644 --- a/NEWS +++ b/NEWS @@ -94,6 +94,7 @@ New Features: - 3493493 Add sfcbsem - 3498932 Implement ModifyInstance for CIM_ListenerDestination +- 3440300 Allow forced chunked responses Bugs Fixed: @@ -112,6 +113,7 @@ Bugs Fixed: - 3497950 SFCB Semaphore Handling Improvements - 3498275 Remove __Namespace - 3426027 cimAccountPassThrough does not set return code +- 3492362 Problem with whitespace trimming if local connect only Changes in 1.3.13 ================= diff --git a/cimRequest.c b/cimRequest.c index fddc810..0b63bb1 100644 --- a/cimRequest.c +++ b/cimRequest.c @@ -58,11 +58,6 @@ #define SFCB_ASM(x) #endif -#ifdef LOCAL_CONNECT_ONLY_ENABLE -// from httpAdapter.c -int noChunking = 0; -#endif // LOCAL_CONNECT_ONLY_ENABLE - typedef struct handler { RespSegments(*handler) (CimRequestContext *, RequestHdr * hdr); } Handler; @@ -71,7 +66,6 @@ typedef struct scanner { RequestHdr (*scan) (CimRequestContext*, char*,int*); } Scanner; -extern int noChunking; extern CMPIBroker *Broker; //extern UtilStringBuffer *newStringBuffer(int s); @@ -828,7 +822,7 @@ enumClasses(CimRequestContext * ctx, RequestHdr * hdr) BinResponseHdr **resp; _SFCB_ENTER(TRACE_CIMXMLPROC, "enumClasses"); - if (noChunking || ctx->teTrailers == 0) + if (ctx->teTrailers == 0) hdr->chunkedMode = hdr->binCtx->chunkedMode = 0; else { hdr->binCtx->bHdr->flags |= FL_chunked; @@ -850,7 +844,7 @@ enumClasses(CimRequestContext * ctx, RequestHdr * hdr) closeProviderContext(hdr->binCtx); - if (noChunking || ctx->teTrailers == 0) { + if (ctx->teTrailers == 0) { if (err == 0) { rs = genResponses(hdr->binCtx, resp, l); } else { @@ -1088,8 +1082,9 @@ enumInstances(CimRequestContext * ctx, RequestHdr * hdr) err = 0; BinResponseHdr **resp; - if (noChunking || ctx->teTrailers == 0) + if (ctx->teTrailers == 0) { hdr->chunkedMode = hdr->binCtx->chunkedMode = 0; + } else { hdr->binCtx->bHdr->flags |= FL_chunked; hdr->chunkedMode = hdr->binCtx->chunkedMode = 1; @@ -1109,7 +1104,7 @@ enumInstances(CimRequestContext * ctx, RequestHdr * hdr) _SFCB_TRACE(1, ("--- Back from Providers")); closeProviderContext(hdr->binCtx); - if (noChunking || ctx->teTrailers == 0) { + if (ctx->teTrailers == 0) { if (err == 0) { rs = genResponses(hdr->binCtx, resp, l); } else { @@ -1147,7 +1142,7 @@ execQuery(CimRequestContext * ctx, RequestHdr * hdr) hdr->binCtx->commHndl = ctx->commHndl; hdr->binCtx->chunkFncs = ctx->chunkFncs; - if (noChunking || ctx->teTrailers == 0) + if (ctx->teTrailers == 0) hdr->chunkedMode = hdr->binCtx->chunkedMode = 0; else { hdr->binCtx->bHdr->flags |= FL_chunked; @@ -1166,7 +1161,7 @@ execQuery(CimRequestContext * ctx, RequestHdr * hdr) _SFCB_TRACE(1, ("--- Back from Provider")); closeProviderContext(hdr->binCtx); - if (noChunking || ctx->teTrailers == 0) { + if (ctx->teTrailers == 0) { if (err == 0) { rs = genResponses(hdr->binCtx, resp, l); } else { @@ -1244,7 +1239,7 @@ associators(CimRequestContext * ctx, RequestHdr * hdr) hdr->binCtx->commHndl = ctx->commHndl; hdr->binCtx->chunkFncs = ctx->chunkFncs; - if (noChunking || ctx->teTrailers == 0) + if (ctx->teTrailers == 0) hdr->chunkedMode = hdr->binCtx->chunkedMode = 0; else { hdr->binCtx->bHdr->flags |= FL_chunked; @@ -1263,7 +1258,7 @@ associators(CimRequestContext * ctx, RequestHdr * hdr) closeProviderContext(hdr->binCtx); - if (noChunking || ctx->teTrailers == 0) { + if (ctx->teTrailers == 0) { if (err == 0) { rs = genResponses(hdr->binCtx, resp, l); } else { @@ -1342,7 +1337,7 @@ references(CimRequestContext * ctx, RequestHdr * hdr) hdr->binCtx->commHndl = ctx->commHndl; hdr->binCtx->chunkFncs = ctx->chunkFncs; - if (noChunking || ctx->teTrailers == 0) + if (ctx->teTrailers == 0) hdr->chunkedMode = hdr->binCtx->chunkedMode = 0; else { hdr->binCtx->bHdr->flags |= FL_chunked; @@ -1360,7 +1355,7 @@ references(CimRequestContext * ctx, RequestHdr * hdr) _SFCB_TRACE(1, ("--- Back from Provider")); closeProviderContext(hdr->binCtx); - if (noChunking || ctx->teTrailers == 0) { + if (ctx->teTrailers == 0) { if (err == 0) { rs = genResponses(hdr->binCtx, resp, l); } else { diff --git a/httpAdapter.c b/httpAdapter.c index f9d2830..4602878 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -82,7 +82,12 @@ static int doBa; static int doUdsAuth; #endif static int doFork = 0; -int noChunking = 0; + +#define CHUNK_NEVER 0 +#define CHUNK_ALLOW 1 +#define CHUNK_FORCE 2 +int chunkMode = CHUNK_ALLOW; + int sfcbSSLMode = 0; /* used as a global sslMode */ int httpLocalOnly = 0; /* 1 = only listen on loopback * interface */ @@ -95,7 +100,6 @@ static long keepaliveMaxRequest = 10; static long numRequest; static long selectTimeout = 5; /* default 5 sec. timeout for select() before read() */ struct timeval httpSelectTimeout = { 0, 0 }; -int trimws; #if defined USE_SSL static SSL_CTX *ctx; @@ -1110,7 +1114,9 @@ doHttpRequest(CommHndl conn_fd) ctx.cimDoc = inBuf.content; ctx.principal = inBuf.principal; ctx.host = inBuf.host; - ctx.teTrailers = inBuf.trailers; + /* override based on sfcb.cfg value */ + ctx.teTrailers = (chunkMode == CHUNK_FORCE) ? 1 : inBuf.trailers; + if (chunkMode == CHUNK_NEVER) ctx.teTrailers = 0; ctx.cimDocLength = len - hl; ctx.commHndl = &conn_fd; ctx.contentType = inBuf.content_type; @@ -1878,12 +1884,11 @@ httpDaemon(int argc, char *argv[], int sslMode) if (getControlNum("keepaliveMaxRequest", &keepaliveMaxRequest)) keepaliveMaxRequest = 10; - if (getControlBool("useChunking", &noChunking)) - noChunking = 0; - noChunking = noChunking == 0; - - if (getControlBool("trimWhitespace", &trimws)) - trimws = 0; + char* chunkStr; + if (getControlChars("useChunking", &chunkStr) == 0) { + if (strcmp(chunkStr, "false") == 0) chunkMode = CHUNK_NEVER; + else if (strcmp(chunkStr, "always") == 0) chunkMode = CHUNK_FORCE; + } /* * grab commandline options diff --git a/sfcBroker.c b/sfcBroker.c index b755fe5..dcf7412 100644 --- a/sfcBroker.c +++ b/sfcBroker.c @@ -93,6 +93,8 @@ static int adaptersStopped = 0, extern char *configfile; +int trimws = 1; + typedef struct startedAdapter { struct startedAdapter *next; int stopped; @@ -781,6 +783,11 @@ main(int argc, char *argv[]) "--- Max provider process number adjusted to %d\n", pSockets); } + /* Check for whitespace trimming option */ + if (getControlBool("trimWhitespace", &trimws)) { + trimws = 0; + } + if ((enableHttp || enableHttps) && dSockets > 0) { startHttp = 1; } hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2012-03-08 06:26:25
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv15710 Modified Files: objectImpl.c Log Message: [3471814] segfault in objectImpl.c:131,ClObjectGetClString Index: objectImpl.c =================================================================== RCS file: /cvsroot/sblim/sfcb/objectImpl.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- objectImpl.c 21 Jun 2011 22:15:09 -0000 1.53 +++ objectImpl.c 8 Mar 2012 06:26:23 -0000 1.54 @@ -483,6 +483,63 @@ _SFCB_EXIT(); } +/* Removes an object from the string buffer. The CMPIData pointing to that + object remains intact. A call to this function MUST be followed by a + call to addClObject(), else one of the CMPIData entries will be invalid. + + id - the number of the entry to be removed + */ +static void +removeClObject(ClObjectHdr * hdr, int id) +{ + _SFCB_ENTER(TRACE_OBJECTIMPL, "removeClObject"); + // fprintf(stderr, "replaceClString: %p replacing entry for we're skipping %d\n", hdr, (id-1)); + char *ts, *fs, *tmpstr = NULL; + long i, l, u; + ClStrBuf *fb; + + fb = getStrBufPtr(hdr); + ts = (char *) malloc(fb->bUsed); /* tmp string buffer */ + fs = &fb->buf[0]; + + for (u = i = 0; i < fb->iUsed; i++) { + if (i != id - 1) { /* loop through and copy over all _other_ properties */ + // fprintf(stderr, "replace: keeping %ld\n", i); + char *f = fs + fb->indexPtr[i]; + l = fb->indexPtr[i+1] - fb->indexPtr[i]; + + /* Bugzilla 74159 - Align the string buffer & null terminate */ + /*if (l % sizeof(long) != 0) { + l = ALIGN((fb->indexPtr[i+1] - fb->indexPtr[i]), CLALIGN); + tmpstr = calloc(1,l); + if (tmpstr == NULL) { + _SFCB_TRACE(1, ("objectImpl:replaceClString: calloc failed for tmpstr")); + } + memcpy(tmpstr, f, l); + } */ + + fb->indexPtr[i] = u; + + /*if (tmpstr != NULL) { + memcpy(ts + u, tmpstr, l); + free(tmpstr); + tmpstr = NULL; + } + else */ + memcpy(ts + u, f, l); + + u += l; + } + } + memcpy(fs, ts, u); + fb->bUsed = u; + free(ts); + + fb->iUsed--; /* fixup the item count, since we have one fewer elements */ + + _SFCB_EXIT(); +} + //hack to get anything into a stringbuffer static void replaceClObject(ClObjectHdr * hdr, int id, const void *obj, int size) { @@ -1496,6 +1553,25 @@ free(blob); } } + /* bugzilla 75997 - hdr->type is args */ + else if (hdr->type == HDR_Args && + od.type == CMPI_instance && (d.state & CMPI_nullValue) == 0) { + if (d.type != CMPI_instance) { + _SFCB_RETURN(CMPI_RC_ERR_TYPE_MISMATCH); + } + else { + (p + i - 1)->data = d; + int size = getInstanceSerializedSize(d.value.inst); + void * blob = malloc(size); + getSerializedInstance(d.value.inst, blob); + //fprintf(stderr, "od.value.inst = %ld\n", (long)od.value.inst); + if (od.value.inst) { + removeClObject(hdr, (long)od.value.inst); + } + (p + i - 1)->data.value.inst = (CMPIInstance *) addClObject(hdr, blob, size); + free(blob); + } + } else(p + i - 1)->data = d; _SFCB_RETURN(i); |
From: Narasimha S. <nsh...@us...> - 2012-03-08 06:26:00
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv15667 Modified Files: ChangeLog Log Message: [3471814] segfault in objectImpl.c:131,ClObjectGetClString Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.736 retrieving revision 1.737 diff -u -d -r1.736 -r1.737 --- ChangeLog 8 Mar 2012 03:10:29 -0000 1.736 +++ ChangeLog 8 Mar 2012 06:25:58 -0000 1.737 @@ -1,3 +1,9 @@ +2012-03-08 Narasimha Sharoff <nsh...@us...> + + * objectImpl.c: + [ 3471814 ] segfault in objectImpl.c:131,ClObjectGetClString + (Patch by Chris Buccella and Narasimha Sharoff) + 2012-03-07 Dave Heller <hel...@us...> * httpAdapter.c: |
From: Narasimha S. <nsh...@us...> - 2012-03-08 06:25:40
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv15626 Modified Files: NEWS Log Message: [3471814] segfault in objectImpl.c:131,ClObjectGetClString Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.659 retrieving revision 1.660 diff -u -d -r1.659 -r1.660 --- NEWS 8 Mar 2012 03:10:29 -0000 1.659 +++ NEWS 8 Mar 2012 06:25:38 -0000 1.660 @@ -50,6 +50,7 @@ - 3498044 RIEnabled conflicts with settable retries - 3426027 cimAccountPassThrough does not set return code - 3498719 Better SSL error reporting for sfcb +- 3471814 segfault in objectImpl.c:131,ClObjectGetClString Changes in 1.3.13 ================= |