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: Michael Chase-S. <mc...@us...> - 2011-11-23 18:22:18
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv22470 Modified Files: ChangeLog NEWS indCIMXMLHandler.c instance.c instance.h interopProvider.c Log Message: [ 3433733 ] CreationClassNames should be supplied Index: instance.c =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- instance.c 16 Jun 2010 22:48:21 -0000 1.52 +++ instance.c 23 Nov 2011 18:22:16 -0000 1.53 @@ -956,6 +956,23 @@ } #endif +/* + Set the CreationClassName and SystemCreationClassName + According to DSP1001, these need not be specified by the client + and should be ignored if provided. +*/ +void +setCCN(CMPIObjectPath * cop, + CMPIInstance *ci, + const char * sccn) +{ + CMPIString* ccn = CMGetClassName(cop, NULL); + CMAddKey(cop, "creationclassname", CMGetCharPtr(ccn), CMPI_chars); + CMSetProperty(ci,"creationclassname", CMGetCharPtr(ccn), CMPI_chars); + CMAddKey(cop, "systemcreationclassname", sccn, CMPI_chars); + CMSetProperty(ci,"systemcreationclassname", sccn, CMPI_chars); +} + /****************************************************************************/ /*** Local Variables: ***/ Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.700 retrieving revision 1.701 diff -u -d -r1.700 -r1.701 --- ChangeLog 23 Nov 2011 03:24:00 -0000 1.700 +++ ChangeLog 23 Nov 2011 18:22:16 -0000 1.701 @@ -1,3 +1,8 @@ +2011-11-23 Michael Chase-Salerno <br...@li...> + + * interopProvider.c, indCIMXMLHandler.c, instance.c, instance.h: + [ 3433733 ] CreationClassNames should be supplied + 2011-11-22 Michael Chase-Salerno <br...@li...> * cimXmlParser.c, control.c, httpAdapter.c, sfcb.cfg.pre.in: Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- interopProvider.c 26 Aug 2011 02:02:18 -0000 1.47 +++ interopProvider.c 23 Nov 2011 18:22:16 -0000 1.48 @@ -843,20 +843,7 @@ } else if (isa(nss, cns, "cim_indicationfilter")) { - CMPIString *ccn = ciLocal->ft->getProperty(ciLocal, "creationclassname", - &st).value.string; - if (CMIsNullObject(ccn)) { - setStatus(&st, CMPI_RC_ERR_FAILED, - "CreationClassName property not found"); - _SFCB_RETURN(st); - } - CMPIString *sccn = ciLocal->ft->getProperty(ciLocal, "systemcreationclassname", - &st).value.string; - if (CMIsNullObject(sccn)) { - setStatus(&st, CMPI_RC_ERR_FAILED, - "SystemCreationClassName property not found"); - _SFCB_RETURN(st); - } + setCCN(copLocal,ciLocal,"CIM_ComputerSystem"); QLStatement *qs=NULL; int rc,i,n,m; Index: instance.h =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- instance.h 11 May 2010 21:34:55 -0000 1.3 +++ instance.h 23 Nov 2011 18:22:16 -0000 1.4 @@ -25,5 +25,6 @@ const char *instGetClassName(CMPIInstance * ci); const char *instGetNameSpace(CMPIInstance * ci); CMPIStatus filterFlagProperty(CMPIInstance* ci, const char* id); +void setCCN(CMPIObjectPath * cop, CMPIInstance *ci, const char * sccn); #endif Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- indCIMXMLHandler.c 23 Aug 2011 00:08:21 -0000 1.39 +++ indCIMXMLHandler.c 23 Nov 2011 18:22:16 -0000 1.40 @@ -318,20 +318,7 @@ CMPIObjectPath* copLocal = CMClone(cop, NULL); memLinkObjectPath(copLocal); - CMPIString *ccn = ciLocal->ft->getProperty(ciLocal, "creationclassname", - &st).value.string; - if (CMIsNullObject(ccn)) { - setStatus(&st, CMPI_RC_ERR_FAILED, - "CreationClassName property not found"); - _SFCB_RETURN(st); - } - CMPIString *sccn = ciLocal->ft->getProperty(ciLocal, "systemcreationclassname", - &st).value.string; - if (CMIsNullObject(sccn)) { - setStatus(&st, CMPI_RC_ERR_FAILED, - "SystemCreationClassName property not found"); - _SFCB_RETURN(st); - } + setCCN(copLocal,ciLocal,"CIM_ComputerSystem"); CMPIString *sysname=ciLocal->ft->getProperty(ciLocal,"SystemName",&st).value.string; if (sysname == NULL || sysname->hdl == NULL) { Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.624 retrieving revision 1.625 diff -u -d -r1.624 -r1.625 --- NEWS 23 Nov 2011 03:24:00 -0000 1.624 +++ NEWS 23 Nov 2011 18:22:16 -0000 1.625 @@ -6,6 +6,7 @@ - 3367333 New entry point for authentication library - 3367332 RHOST Support for PAM - 3435778 Preserve leading/trailing whitespace in values +- 3433733 CreationClassNames should be supplied Bugs fixed: |
From: Michael Chase-S. <mc...@us...> - 2011-11-23 03:54:24
|
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 10b508a77d4e2e0eb8a140962b1b77fdbc3db7a0 (commit) via e2bc679719740393e8c8458bbc3ed2e77d6d49a2 (commit) from d53481dce97af2bb32d25e025e8d226893f08f72 (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 10b508a77d4e2e0eb8a140962b1b77fdbc3db7a0 Author: Michael Chase-Salerno <br...@li...> Date: Tue Nov 22 22:53:32 2011 -0500 [ 3435778 ] Preserve leading/trailing whitespace in values commit e2bc679719740393e8c8458bbc3ed2e77d6d49a2 Author: Michael Chase-Salerno <br...@li...> Date: Tue Nov 22 22:51:10 2011 -0500 3435778 Preserve leading/trailing whitespace in values ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index f47c1a2..63c1d5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-22 Michael Chase-Salerno <br...@li...> + + * cimXmlParser.c, control.c, httpAdapter.c, sfcb.cfg.pre.in: + [ 3435778 ] Preserve leading/trailing whitespace in values + 2011-11-04 Chris Buccella <buc...@li...> * objectImpl.c: diff --git a/README b/README index 240c7d4..36ab75d 100644 --- a/README +++ b/README @@ -513,6 +513,7 @@ file /usr/local/etc/sfcb/sfcb.cfg. For example: sslCiphers: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH registrationDir: /usr/local/var/lib/sfcb/registration providerDirs: /usr/local/lib/sfcb /usr/local/lib /usr/local/lib/cmpi + trimWhitespace: true Config Option Descriptions -------------------------- @@ -660,6 +661,11 @@ traceFile Specify the trace file for sfcb. Can be overriden by setting environment variable SFCB_TRACE_FILE. Default: stderr. +trimWhitespace + Trim leading and trailing whitespace from XML property values. + Whitespace is space, tab, crlf. Any ascii value <= 32. + Default is true + After making any changes to sfcb.cfg you must restart sfcb or get it to reload the config file by typing diff --git a/cimXmlParser.c b/cimXmlParser.c index 90686fd..cd75652 100644 --- a/cimXmlParser.c +++ b/cimXmlParser.c @@ -28,6 +28,8 @@ #include "cimRequest.h" #include "trace.h" +extern int trimws; + static int attrsOk(XmlBuffer * xb, const XmlElement * e, XmlAttr * r, const char *tag, int etag); static char *getValue(XmlBuffer * xb, const char *v); @@ -433,22 +435,24 @@ getContent(XmlBuffer * xb) xb->nulledChar = *(xb->cur); *(xb->cur) = 0; - /* - * skip leading blanks - */ - while (*start && *start <= ' ') - start++; - if (start == NULL) - return ""; // should check for *start == NULL - // instead? start==NULL shouldn't happen, - // ever. end = xb->cur; - /* - * strip trailing blanks - */ - while (*(end - 1) <= ' ') { - *(end - 1) = 0; - end -= 1; + + if (trimws) { + /* + * skip leading blanks + */ + while (*start && *start <= ' ') + start++; + if (start == NULL) + return ""; // should check for *start == NULL + // instead? start==NULL shouldn't happen, ever. + /* + * strip trailing blanks + */ + while (*(end - 1) <= ' ') { + *(end - 1) = 0; + end -= 1; + } } /* * unescape diff --git a/control.c b/control.c index 11f1567..0c5f30f 100644 --- a/control.c +++ b/control.c @@ -82,6 +82,8 @@ Control init[] = { {"useChunking", 2, "false"}, {"chunkSize", 1, "50000"}, + {"trimWhitespace", 2, "true"}, + {"keepaliveTimeout", 1, "15"}, {"keepaliveMaxRequest", 1, "10"}, {"selectTimeout", 1, "5"}, diff --git a/httpAdapter.c b/httpAdapter.c index 67bcb5c..1614e16 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -95,6 +95,7 @@ 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; @@ -1767,6 +1768,9 @@ httpDaemon(int argc, char *argv[], int sslMode) noChunking = 0; noChunking = noChunking == 0; + if (getControlBool("trimWhitespace", &trimws)) + trimws = 0; + /* * grab commandline options */ diff --git a/sfcb.cfg.pre.in b/sfcb.cfg.pre.in index f22dbec..20c69f7 100644 --- a/sfcb.cfg.pre.in +++ b/sfcb.cfg.pre.in @@ -95,6 +95,11 @@ basicAuthLib: @SFCB_CONF_BASICAUTHLIB@ ## Default is NULL which means no change to the default permission. #socketPathGroupPerm: daemon +## Trim leading and trailing whitespace from XML property values. +## Whitespace is space, tab, crlf. Any ascii value <= 32. +## Default is true +#trimWhitespace: true + ##---------------------------- Provider-Related ------------------------------- ## Max number of provider processes. hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2011-11-23 03:24:03
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv9974 Modified Files: ChangeLog NEWS README cimXmlParser.c control.c httpAdapter.c sfcb.cfg.pre.in Log Message: 3435778 Preserve leading/trailing whitespace in values Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.699 retrieving revision 1.700 diff -u -d -r1.699 -r1.700 --- ChangeLog 22 Nov 2011 20:58:18 -0000 1.699 +++ ChangeLog 23 Nov 2011 03:24:00 -0000 1.700 @@ -1,3 +1,8 @@ +2011-11-22 Michael Chase-Salerno <br...@li...> + + * cimXmlParser.c, control.c, httpAdapter.c, sfcb.cfg.pre.in: + [ 3435778 ] Preserve leading/trailing whitespace in values + 2011-11-22 Chris Buccella <buc...@li...> * httpAdapter.c, sfcBasicPAMAuthentication.c: Index: sfcb.cfg.pre.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.cfg.pre.in,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- sfcb.cfg.pre.in 22 Nov 2011 20:41:20 -0000 1.28 +++ sfcb.cfg.pre.in 23 Nov 2011 03:24:00 -0000 1.29 @@ -94,6 +94,11 @@ ## Default is NULL which means no change to the default permission. #socketPathGroupPerm: daemon +## Trim leading and trailing whitespace from XML property values. +## Whitespace is space, tab, crlf. Any ascii value <= 32. +## Default is true +#trimWhitespace: true + ##---------------------------- Provider-Related ------------------------------- ## Max number of provider processes. Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.95 retrieving revision 1.96 diff -u -d -r1.95 -r1.96 --- httpAdapter.c 22 Nov 2011 20:58:18 -0000 1.95 +++ httpAdapter.c 23 Nov 2011 03:24:00 -0000 1.96 @@ -90,6 +90,7 @@ 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; @@ -1620,6 +1621,9 @@ noChunking = 0; noChunking = noChunking == 0; + if (getControlBool("trimWhitespace", &trimws)) + trimws = 0; + /* * grab commandline options */ Index: README =================================================================== RCS file: /cvsroot/sblim/sfcb/README,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- README 9 Sep 2011 22:54:18 -0000 1.57 +++ README 23 Nov 2011 03:24:00 -0000 1.58 @@ -498,6 +498,7 @@ sslCiphers: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH registrationDir: /usr/local/var/lib/sfcb/registration providerDirs: /usr/local/lib/sfcb /usr/local/lib /usr/local/lib/cmpi + trimWhitespace: true Config Option Descriptions -------------------------- @@ -640,6 +641,11 @@ Specify the trace file for sfcb. Can be overriden by setting environment variable SFCB_TRACE_FILE. Default: stderr. +trimWhitespace + Trim leading and trailing whitespace from XML property values. + Whitespace is space, tab, crlf. Any ascii value <= 32. + Default is true + After making any changes to sfcb.cfg you must restart sfcb or get it to reload the config file by typing Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.623 retrieving revision 1.624 diff -u -d -r1.623 -r1.624 --- NEWS 22 Nov 2011 20:58:18 -0000 1.623 +++ NEWS 23 Nov 2011 03:24:00 -0000 1.624 @@ -5,6 +5,7 @@ - 3367333 New entry point for authentication library - 3367332 RHOST Support for PAM +- 3435778 Preserve leading/trailing whitespace in values Bugs fixed: Index: cimXmlParser.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlParser.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- cimXmlParser.c 21 May 2010 22:26:50 -0000 1.35 +++ cimXmlParser.c 23 Nov 2011 03:24:00 -0000 1.36 @@ -30,6 +30,8 @@ #include "trace.h" +extern int trimws; + static int attrsOk(XmlBuffer * xb, const XmlElement * e, XmlAttr * r, const char *tag, int etag); static char *getValue(XmlBuffer * xb, const char *v); @@ -438,14 +440,17 @@ xb->nulledChar = *(xb->cur); *(xb->cur) = 0; - /* skip leading blanks */ - while (*start && *start<=' ') start++; - if (start == NULL) return ""; // should check for *start == NULL instead? start==NULL shouldn't happen, ever. end=xb->cur; - /* strip trailing blanks */ - while (*(end-1)<=' ') { - *(end-1) = 0; - end -= 1; + + if (trimws) { + /* skip leading blanks */ + while (*start && *start<=' ') start++; + if (start == NULL) return ""; // should check for *start == NULL instead? start==NULL shouldn't happen, ever. + /* strip trailing blanks */ + while (*(end-1)<=' ') { + *(end-1) = 0; + end -= 1; + } } /* unescape */ help = start; Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- control.c 22 Nov 2011 20:41:19 -0000 1.41 +++ control.c 23 Nov 2011 03:24:00 -0000 1.42 @@ -92,6 +92,8 @@ {"useChunking", 2, "false"}, {"chunkSize", 1, "50000"}, + + {"trimWhitespace", 2, "true"}, {"keepaliveTimeout", 1, "15"}, {"keepaliveMaxRequest", 1, "10"}, |
From: Chris B. <buc...@us...> - 2011-11-22 20:58:21
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv21939 Modified Files: httpAdapter.c sfcBasicPAMAuthentication.c ChangeLog NEWS Log Message: [ 3367332 ] RHOST Support for PAM Index: sfcBasicPAMAuthentication.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBasicPAMAuthentication.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sfcBasicPAMAuthentication.c 8 Mar 2011 20:47:11 -0000 1.2 +++ sfcBasicPAMAuthentication.c 22 Nov 2011 20:58:18 -0000 1.3 @@ -28,6 +28,14 @@ #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) { @@ -50,7 +58,7 @@ } -static int _sfcBasicAuthenticateRemote(char *user, char *pw, char *rhost) +static int _sfcBasicAuthenticateRemote(char *user, char *pw, AuthExtras *extras) { struct pam_conv sfcConvStruct = { sfcBasicConv, @@ -61,17 +69,15 @@ 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); } if (rc == PAM_SUCCESS) { @@ -93,3 +99,9 @@ { return _sfcBasicAuthenticateRemote(user, pw, NULL); } + +int +_sfcBasicAuthenticate2(char *user, char *pw, AuthExtras *extras) +{ + return _sfcBasicAuthenticateRemote(user, pw, extras); +} Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.622 retrieving revision 1.623 diff -u -d -r1.622 -r1.623 --- NEWS 22 Nov 2011 20:41:20 -0000 1.622 +++ NEWS 22 Nov 2011 20:58:18 -0000 1.623 @@ -4,6 +4,7 @@ New features: - 3367333 New entry point for authentication library +- 3367332 RHOST Support for PAM Bugs fixed: Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- httpAdapter.c 22 Nov 2011 20:41:20 -0000 1.94 +++ httpAdapter.c 22 Nov 2011 20:58:18 -0000 1.95 @@ -962,6 +962,20 @@ 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 if (barc == AUTH_EXPIRED) { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.698 retrieving revision 1.699 diff -u -d -r1.698 -r1.699 --- ChangeLog 22 Nov 2011 20:41:20 -0000 1.698 +++ ChangeLog 22 Nov 2011 20:58:18 -0000 1.699 @@ -1,7 +1,10 @@ 2011-11-22 Chris Buccella <buc...@li...> + * httpAdapter.c, sfcBasicPAMAuthentication.c: + [ 3367332 ] RHOST Support for PAM + * control.c, httpAdapter.c, sfcb.cfg.pre.in: - [ 3367333 ] New entry point for authentication library + [ 3367333 ] New entry point for authentication librarya 2011-11-07 Narasimha Sharoff <nsh...@us...> |
From: Chris B. <buc...@us...> - 2011-11-22 20:41:22
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv17598 Modified Files: control.c httpAdapter.c sfcb.cfg.pre.in ChangeLog NEWS Log Message: [ 3367333 ] New entry point for authentication library Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.621 retrieving revision 1.622 diff -u -d -r1.621 -r1.622 --- NEWS 8 Nov 2011 05:03:21 -0000 1.621 +++ NEWS 22 Nov 2011 20:41:20 -0000 1.622 @@ -1,6 +1,10 @@ Changes in 1.3.14 ================= +New features: + +- 3367333 New entry point for authentication library + Bugs fixed: - 3414700 assocClass ignored for assoc upcalls Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- control.c 9 Sep 2011 22:54:18 -0000 1.40 +++ control.c 22 Nov 2011 20:41:19 -0000 1.41 @@ -86,6 +86,7 @@ #endif {"provProcs", 1, "32"}, {"basicAuthLib", 0, "sfcBasicAuthentication"}, + {"basicAuthEntry", 0, "_sfcBasicAuthenticate"}, {"doBasicAuth", 2, "false"}, {"doUdsAuth", 2, "false"}, Index: sfcb.cfg.pre.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.cfg.pre.in,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- sfcb.cfg.pre.in 9 Sep 2011 22:54:18 -0000 1.27 +++ sfcb.cfg.pre.in 22 Nov 2011 20:41:20 -0000 1.28 @@ -62,6 +62,11 @@ ## Default is 5 #selectTimeout: 5 +## 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 between two requests ## on one connection before terminating. 0 will disable HTTP keep-alive. ## Default is 15 Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- httpAdapter.c 9 Sep 2011 22:54:18 -0000 1.93 +++ httpAdapter.c 22 Nov 2011 20:41:20 -0000 1.94 @@ -130,7 +130,16 @@ static unsigned int sessionId; extern char *opsName[]; -typedef int (*Authenticate)(char* principal, char* pwd); +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, *content; @@ -201,14 +210,16 @@ * Call the authentication library * Return 1 on success, 0 on fail, -1 on expired */ -int baValidate(char *cred, char **principal) +int 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; auth=decode64(cred+6); @@ -224,19 +235,28 @@ char *ln; if (getControlChars("basicAuthlib", &ln)==0) { libraryName(NULL,ln,dlName, 512); - if ((authLib=dlopen(dlName, RTLD_LAZY))) { - authenticate= dlsym(authLib, "_sfcBasicAuthenticate"); + 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 == NULL) { - mlogf(M_ERROR,M_SHOW,"--- Authentication exit %s not found or dlsym failed\n",dlName); - ret = AUTH_FAIL; - } } - 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; @@ -937,10 +957,12 @@ } } #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; Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.697 retrieving revision 1.698 diff -u -d -r1.697 -r1.698 --- ChangeLog 8 Nov 2011 05:04:31 -0000 1.697 +++ ChangeLog 22 Nov 2011 20:41:20 -0000 1.698 @@ -1,3 +1,8 @@ +2011-11-22 Chris Buccella <buc...@li...> + + * control.c, httpAdapter.c, sfcb.cfg.pre.in: + [ 3367333 ] New entry point for authentication library + 2011-11-07 Narasimha Sharoff <nsh...@us...> * cimXmlGen.c: |
From: Tyrel D. <ty...@us...> - 2011-11-17 02:15:23
|
Update of /cvsroot/sblim/gather/plugin In directory vz-cvs-3.sog:/tmp/cvs-serv17516/plugin Modified Files: metricIPProtocolEndpoint.c Log Message: Fixed under allocation of data buffer for BytesSubmitted Index: metricIPProtocolEndpoint.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricIPProtocolEndpoint.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- metricIPProtocolEndpoint.c 15 Nov 2011 04:57:17 -0000 1.8 +++ metricIPProtocolEndpoint.c 17 Nov 2011 02:15:21 -0000 1.9 @@ -111,7 +111,7 @@ char * end = NULL; char port[64]; char buf[60000]; - char values[(6*ULL_CHAR_MAX)+6]; + char values[(8*ULL_CHAR_MAX)+9]; size_t bytes_read = 0; int i = 0; unsigned long long receive_byte, receive_packets, receive_error, receive_drop = 0; |
From: Tyrel D. <ty...@us...> - 2011-11-17 01:06:37
|
Update of /cvsroot/sblim/gather In directory vz-cvs-3.sog:/tmp/cvs-serv9611 Modified Files: NEWS Log Message: Fixed 3439114: storage plugin leaks file descriptors Index: NEWS =================================================================== RCS file: /cvsroot/sblim/gather/NEWS,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- NEWS 17 Nov 2011 01:01:26 -0000 1.114 +++ NEWS 17 Nov 2011 01:06:35 -0000 1.115 @@ -9,6 +9,7 @@ - 3429346 libvirt race conditions - 3429347 initscript incorrect return code - 3438050 clean up IPProtocolEP raw data parsing +- 3439114 storage plugin leaks file descriptors Features added: - 3438074 add packet drop metrics to IPProtocolEP |
From: Tyrel D. <ty...@us...> - 2011-11-17 01:01:28
|
Update of /cvsroot/sblim/gather/plugin In directory vz-cvs-3.sog:/tmp/cvs-serv8026/plugin Added Files: metricStorage.c repositoryStorage.c Log Message: Fixed 3439075: add Host Block IO metrics --- NEW FILE: repositoryStorage.c --- /* * $Id: repositoryStorage.c,v 1.1 2011/11/17 01:01:26 tyreld Exp $ * * (C) Copyright IBM Corp. 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Author: Tyrel Datwyler <ty...@us...> * Contributors: * * Description: * Repository Plugin of the following IP Protocol Endpoint specific metrics : * * _BlockStorage * */ /* ---------------------------------------------------------------------------*/ #include <mplugin.h> #include <stdio.h> #include <stdlib.h> #include <string.h> /* ---------------------------------------------------------------------------*/ static MetricCalculationDefinition metricCalcDef[4]; static MetricCalculator metricCalcBlockStorage; static MetricCalculator metricCalcRead; static MetricCalculator metricCalcWrite; static MetricCalculator metricCalcCapacity; /* unit definitions */ static char * muBytes = "Bytes"; static char * muKbytes = "Kilobytes"; static char * muNa ="N/A"; /* ---------------------------------------------------------------------------*/ enum indices { READ, WRITE, CAPACITY }; static unsigned long long dev_getData(char * data, char index); /* ---------------------------------------------------------------------------*/ int _DefinedRepositoryMetrics( MetricRegisterId *mr, const char *pluginname, size_t *mcnum, MetricCalculationDefinition **mc ) { #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Retrieving metric calculation definitions\n", __FILE__,__LINE__); #endif if (mr==NULL||mcnum==NULL||mc==NULL) { fprintf(stderr,"--- %s(%i) : invalid parameter list\n",__FILE__,__LINE__); return -1; } metricCalcDef[0].mcVersion=MD_VERSION; metricCalcDef[0].mcName="_BlockStorage"; metricCalcDef[0].mcId=mr(pluginname,metricCalcDef[0].mcName); metricCalcDef[0].mcMetricType=MD_PERIODIC|MD_RETRIEVED|MD_POINT; metricCalcDef[0].mcIsContinuous=MD_FALSE; metricCalcDef[0].mcCalculable=MD_NONCALCULABLE; metricCalcDef[0].mcDataType=MD_STRING; metricCalcDef[0].mcCalc=metricCalcBlockStorage; metricCalcDef[0].mcUnits=muNa; metricCalcDef[1].mcVersion=MD_VERSION; metricCalcDef[1].mcName="Read"; metricCalcDef[1].mcId=mr(pluginname,metricCalcDef[1].mcName); metricCalcDef[1].mcMetricType=MD_PERIODIC|MD_CALCULATED|MD_INTERVAL; metricCalcDef[1].mcChangeType=MD_GAUGE; metricCalcDef[1].mcIsContinuous=MD_TRUE; metricCalcDef[1].mcCalculable=MD_SUMMABLE; metricCalcDef[1].mcDataType=MD_UINT64; metricCalcDef[1].mcAliasId=metricCalcDef[0].mcId; metricCalcDef[1].mcCalc=metricCalcRead; metricCalcDef[1].mcUnits=muKbytes; metricCalcDef[2].mcVersion=MD_VERSION; metricCalcDef[2].mcName="Write"; metricCalcDef[2].mcId=mr(pluginname,metricCalcDef[2].mcName); metricCalcDef[2].mcMetricType=MD_PERIODIC|MD_CALCULATED|MD_INTERVAL; metricCalcDef[2].mcChangeType=MD_GAUGE; metricCalcDef[2].mcIsContinuous=MD_TRUE; metricCalcDef[2].mcCalculable=MD_SUMMABLE; metricCalcDef[2].mcDataType=MD_UINT64; metricCalcDef[2].mcAliasId=metricCalcDef[0].mcId; metricCalcDef[2].mcCalc=metricCalcWrite; metricCalcDef[2].mcUnits=muKbytes; metricCalcDef[3].mcVersion=MD_VERSION; metricCalcDef[3].mcName="Capacity"; metricCalcDef[3].mcId=mr(pluginname,metricCalcDef[3].mcName); metricCalcDef[3].mcMetricType=MD_PERIODIC|MD_CALCULATED|MD_POINT; metricCalcDef[3].mcChangeType=MD_GAUGE; metricCalcDef[3].mcIsContinuous=MD_TRUE; metricCalcDef[3].mcCalculable=MD_NONSUMMABLE; metricCalcDef[3].mcDataType=MD_UINT64; metricCalcDef[3].mcAliasId=metricCalcDef[0].mcId; metricCalcDef[3].mcCalc=metricCalcCapacity; metricCalcDef[3].mcUnits=muBytes; *mcnum=4; *mc=metricCalcDef; return 0; } /* ---------------------------------------------------------------------------*/ /* BlockStorage */ /* ---------------------------------------------------------------------------*/ /* * The raw data BlockStorage has the following syntax : * * <read kb>:<write kb>:<capacity (in bytes)>: * */ size_t metricCalcBlockStorage( MetricValue *mv, int mnum, void *v, size_t vlen ) { #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Calculate BlockStorage\n", __FILE__,__LINE__); #endif /* plain copy */ if (mv && (vlen>=mv->mvDataLength) && (mnum==1) ) { memcpy(v,mv->mvData,mv->mvDataLength); return mv->mvDataLength; } return -1; } /* ---------------------------------------------------------------------------*/ /* Read */ /* ---------------------------------------------------------------------------*/ size_t metricCalcRead( MetricValue *mv, int mnum, void *v, size_t vlen ) { unsigned long long rt = 0; unsigned long long r1 = 0; unsigned long long r2 = 0; #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Calculate Read\n", __FILE__,__LINE__); #endif if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { r1 = dev_getData(mv[0].mvData, READ); if( mnum > 1 ) { r2 = dev_getData(mv[mnum-1].mvData, READ); rt = r1-r2; } else { rt = r1; } memcpy(v,&rt,sizeof(unsigned long long)); return sizeof(unsigned long long); } return -1; } /* ---------------------------------------------------------------------------*/ /* Write */ /* ---------------------------------------------------------------------------*/ size_t metricCalcWrite( MetricValue *mv, int mnum, void *v, size_t vlen ) { unsigned long long wt = 0; unsigned long long w1 = 0; unsigned long long w2 = 0; #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Calculate Write\n", __FILE__,__LINE__); #endif if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { w1 = dev_getData(mv[0].mvData, WRITE); if( mnum > 1 ) { w2 = dev_getData(mv[mnum-1].mvData, WRITE); wt = w1-w2; } else { wt = w1; } memcpy(v,&wt,sizeof(unsigned long long)); return sizeof(unsigned long long); } return -1; } /* ---------------------------------------------------------------------------*/ /* Capacity */ /* ---------------------------------------------------------------------------*/ size_t metricCalcCapacity( MetricValue *mv, int mnum, void *v, size_t vlen ) { unsigned long long ct = 0; #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Calculate Capacity\n", __FILE__,__LINE__); #endif if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { ct = dev_getData(mv[0].mvData, CAPACITY); memcpy(v,&ct,sizeof(unsigned long long)); return sizeof(unsigned long long); } return -1; } /* ---------------------------------------------------------------------------*/ /* tool functions on BlockStorage */ /* ---------------------------------------------------------------------------*/ unsigned long long dev_getData(char * data, char index) { char * hlp = NULL; char * end = NULL; char bytes[128]; unsigned long long val = 0; int i = 0; hlp = data; if ((end = strchr(hlp, ':')) != NULL) { for (i = 0; i < index; i++) { hlp = ++end; if ((end = strchr(hlp, ':')) == NULL) { return val; } } memset(bytes, 0, sizeof(bytes)); strncpy(bytes, hlp, strlen(hlp) - strlen(end)); val = strtoll(bytes, (char**) NULL, 10); } return val; } /* ---------------------------------------------------------------------------*/ /* end of repositoryStorage.c */ /* ---------------------------------------------------------------------------*/ --- NEW FILE: metricStorage.c --- /* * $Id: metricStorage.c,v 1.1 2011/11/17 01:01:26 tyreld Exp $ * * (C) Copyright IBM Corp. 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Eclipse Public License from * http://www.opensource.org/licenses/eclipse-1.0.php * * Author: Tyrel Datwyler <ty...@us...> * Contributors: * * Description: * Metrics Gatherer Plugin of the following Storage specific * metrics : * * _BlockStorage * */ /* ---------------------------------------------------------------------------*/ #include <mplugin.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <limits.h> #include <math.h> #include <sys/ioctl.h> #include <linux/fs.h> #include <fcntl.h> #ifndef ULLONG_MAX # define ULLONG_MAX 18446744073709551615ULL #endif #define ULL_CHAR_MAX ((int) ((log(ULLONG_MAX)) / (log(10)) + 1)) /* ---------------------------------------------------------------------------*/ static MetricDefinition metricDef[1]; static MetricRetriever metricRetrBlockStorage; #define DISKSTATS "/proc/diskstats" /* ---------------------------------------------------------------------------*/ int _DefinedMetrics( MetricRegisterId *mr, const char * pluginname, size_t *mdnum, MetricDefinition **md ) { #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Retrieving metric definitions\n", __FILE__,__LINE__); #endif if (mr==NULL||mdnum==NULL||md==NULL) { fprintf(stderr,"--- %s(%i) : invalid parameter list\n",__FILE__,__LINE__); return -1; } metricDef[0].mdVersion=MD_VERSION; metricDef[0].mdName="_BlockStorage"; metricDef[0].mdReposPluginName="librepositoryStorage.so"; metricDef[0].mdId=mr(pluginname,metricDef[0].mdName); metricDef[0].mdSampleInterval=60; metricDef[0].mproc=metricRetrBlockStorage; metricDef[0].mdeal=free; *mdnum=1; *md=metricDef; return 0; } int _StartStopMetrics (int starting) { #ifdef DEBUG fprintf(stderr,"--- %s(%i) : %s metric processing\n", __FILE__,__LINE__,starting?"Starting":"Stopping"); #endif return 0; } /* ---------------------------------------------------------------------------*/ /* BlockStorage */ /* ---------------------------------------------------------------------------*/ /* * The raw data BlockStorage has the following syntax : * * <read kb>:<write kb>:<capacity (in bytes)>: * */ int metricRetrBlockStorage( int mid, MetricReturner mret ) { MetricValue * mv = NULL; FILE * fhd = NULL; char * ptr = NULL; char * end = NULL; char blk[200]; char dev[210]; char buf[60000]; char values[(3*ULL_CHAR_MAX)+4]; size_t bytes_read = 0; int i = 0; int fd = 0; unsigned long long read, write, capacity = 0; #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Retrieving BlockStorage\n", __FILE__,__LINE__); #endif if (mret==NULL) { fprintf(stderr,"Returner pointer is NULL\n"); } else { #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Sampling for metric BlockStorage ID %d\n", __FILE__,__LINE__,mid); #endif if( (fhd = fopen(DISKSTATS,"r")) != NULL ) { bytes_read = fread(buf, 1, sizeof(buf)-1, fhd); buf[bytes_read] = 0; /* safeguard end of buffer */ if( bytes_read > 0 ) { ptr = buf; while( (end = strchr(ptr,'\n')) != NULL ) { sscanf(ptr, " %*s %*s %[a-z0-9] %*s %*s %lld %*s %*s %*s %lld", blk, &read, &write); sprintf(dev, "/dev/%s", blk); fd = open(dev, O_RDONLY | O_NONBLOCK); if (fd > -1) { ioctl(fd, BLKGETSIZE64, &capacity); } read = read / 2; /* convert form sectors to kb */ write = write / 2; /* 512 bytes/sector, 1kb/1024 bytes = 1kb/2 sectors */ memset(values,0,sizeof(values)); sprintf(values,"%lld:%lld:%lld:", read, write, capacity); mv = calloc(1, sizeof(MetricValue) + (strlen(values)+1) + (strlen(dev)+1) ); if (mv) { mv->mvId = mid; mv->mvTimeStamp = time(NULL); mv->mvDataType = MD_STRING; mv->mvDataLength = (strlen(values)+1); mv->mvData = (char*)mv + sizeof(MetricValue); strcpy(mv->mvData,values); mv->mvResource = (char*)mv + sizeof(MetricValue) + (strlen(values)+1); strcpy(mv->mvResource,dev); mret(mv); } ptr = end+1; i++; } fclose(fhd); } else { return -1; } } return i; } return -1; } /* ---------------------------------------------------------------------------*/ /* end of metricStorage.c */ /* ---------------------------------------------------------------------------*/ |
From: Tyrel D. <ty...@us...> - 2011-11-15 04:57:19
|
Update of /cvsroot/sblim/gather/plugin In directory vz-cvs-3.sog:/tmp/cvs-serv19838/plugin Modified Files: metricIPProtocolEndpoint.c metricIPProtocolEndpoint.readme repositoryIPProtocolEndpoint.c Log Message: Fixed 3438074: add packet drop metrics to IPProtocolEP Index: repositoryIPProtocolEndpoint.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/repositoryIPProtocolEndpoint.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- repositoryIPProtocolEndpoint.c 15 Nov 2011 04:20:53 -0000 1.9 +++ repositoryIPProtocolEndpoint.c 15 Nov 2011 04:57:17 -0000 1.10 @@ -16,7 +16,7 @@ * Description: * Repository Plugin of the following IP Protocol Endpoint specific metrics : * - * BytesSubmitted + * _BytesSubmitted * BytesTransmitted * BytesReceived * ErrorRate @@ -24,6 +24,10 @@ * PacketsReceived * PacketTransmitRate * PacketReceiveRate + * ReceivePacketsDropped + * TransmitPacketsDropped + * ReceivePacketDropRate + * TransmitPacketDropRate * */ @@ -36,7 +40,7 @@ /* ---------------------------------------------------------------------------*/ -static MetricCalculationDefinition metricCalcDef[10]; +static MetricCalculationDefinition metricCalcDef[14]; /* --- BytesSubmitted is base for : * BytesTransmitted, BytesReceived, ErrorRate, @@ -52,7 +56,10 @@ static MetricCalculator metricCalcPacketRecRate; static MetricCalculator metricCalcByteTransRate; static MetricCalculator metricCalcByteRecRate; - +static MetricCalculator metricCalcReceiveDrop; +static MetricCalculator metricCalcTransmitDrop; +static MetricCalculator metricCalcRecDropRate; +static MetricCalculator metricCalcTransDropRate; /* unit definitions */ static char * muBytes = "Bytes"; @@ -199,8 +206,56 @@ metricCalcDef[9].mcAliasId=metricCalcDef[0].mcId; metricCalcDef[9].mcCalc=metricCalcByteRecRate; metricCalcDef[9].mcUnits=muBytesPerSecond; + + metricCalcDef[10].mcVersion=MD_VERSION; + metricCalcDef[10].mcName="ReceivePacketsDropped"; + metricCalcDef[10].mcId=mr(pluginname,metricCalcDef[10].mcName); + metricCalcDef[10].mcMetricType=MD_PERIODIC|MD_CALCULATED|MD_INTERVAL; + metricCalcDef[10].mcChangeType=MD_GAUGE; + metricCalcDef[10].mcIsContinuous=MD_TRUE; + metricCalcDef[10].mcCalculable=MD_SUMMABLE; + metricCalcDef[10].mcDataType=MD_UINT64; + metricCalcDef[10].mcAliasId=metricCalcDef[0].mcId; + metricCalcDef[10].mcCalc=metricCalcReceiveDrop; + metricCalcDef[10].mcUnits=muPackets; - *mcnum=10; + metricCalcDef[11].mcVersion=MD_VERSION; + metricCalcDef[11].mcName="TransmitPacketsDropped"; + metricCalcDef[11].mcId=mr(pluginname,metricCalcDef[11].mcName); + metricCalcDef[11].mcMetricType=MD_PERIODIC|MD_CALCULATED|MD_INTERVAL; + metricCalcDef[11].mcChangeType=MD_GAUGE; + metricCalcDef[11].mcIsContinuous=MD_TRUE; + metricCalcDef[11].mcCalculable=MD_SUMMABLE; + metricCalcDef[11].mcDataType=MD_UINT64; + metricCalcDef[11].mcAliasId=metricCalcDef[0].mcId; + metricCalcDef[11].mcCalc=metricCalcTransmitDrop; + metricCalcDef[11].mcUnits=muPackets; + + metricCalcDef[12].mcVersion=MD_VERSION; + metricCalcDef[12].mcName="ReceiveDropRate"; + metricCalcDef[12].mcId=mr(pluginname,metricCalcDef[12].mcName); + metricCalcDef[12].mcMetricType=MD_PERIODIC|MD_CALCULATED|MD_RATE; + metricCalcDef[12].mcChangeType=MD_GAUGE; + metricCalcDef[12].mcIsContinuous=MD_TRUE; + metricCalcDef[12].mcCalculable=MD_NONSUMMABLE; + metricCalcDef[12].mcDataType=MD_UINT32; + metricCalcDef[12].mcAliasId=metricCalcDef[0].mcId; + metricCalcDef[12].mcCalc=metricCalcRecDropRate; + metricCalcDef[12].mcUnits=muPacketsPerSecond; + + metricCalcDef[13].mcVersion=MD_VERSION; + metricCalcDef[13].mcName="TransmitDropRate"; + metricCalcDef[13].mcId=mr(pluginname,metricCalcDef[13].mcName); + metricCalcDef[13].mcMetricType=MD_PERIODIC|MD_CALCULATED|MD_RATE; + metricCalcDef[13].mcChangeType=MD_GAUGE; + metricCalcDef[13].mcIsContinuous=MD_TRUE; + metricCalcDef[13].mcCalculable=MD_NONSUMMABLE; + metricCalcDef[13].mcDataType=MD_UINT32; + metricCalcDef[13].mcAliasId=metricCalcDef[0].mcId; + metricCalcDef[13].mcCalc=metricCalcTransDropRate; + metricCalcDef[13].mcUnits=muPacketsPerSecond; + + *mcnum=14; *mc=metricCalcDef; return 0; } @@ -524,6 +579,131 @@ /* ---------------------------------------------------------------------------*/ +/* ReceivePacketsDropped */ +/* ---------------------------------------------------------------------------*/ + +size_t metricCalcReceiveDrop( MetricValue *mv, + int mnum, + void *v, + size_t vlen ) { + unsigned long long pr = 0; + unsigned long long p1 = 0; + unsigned long long p2 = 0; + +#ifdef DEBUG + fprintf(stderr,"--- %s(%i) : Calculate PacketsReceived\n", + __FILE__,__LINE__); +#endif + + if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { + + p1 = ip_getData(mv[0].mvData, RX_DROP); + if( mnum > 1 ) { + p2 = ip_getData(mv[mnum-1].mvData, RX_DROP); + pr = p1-p2; + } + else { pr = p1; } + + //fprintf(stderr,"packets received: %lld\n",pr); + memcpy(v,&pr,sizeof(unsigned long long)); + return sizeof(unsigned long long); + } + return -1; +} + + +/* ---------------------------------------------------------------------------*/ +/* TransmitPacketsDropped */ +/* ---------------------------------------------------------------------------*/ + +size_t metricCalcTransmitDrop( MetricValue *mv, + int mnum, + void *v, + size_t vlen ) { + unsigned long long pt = 0; + unsigned long long p1 = 0; + unsigned long long p2 = 0; + +#ifdef DEBUG + fprintf(stderr,"--- %s(%i) : Calculate PacketsTransmitted\n", + __FILE__,__LINE__); +#endif + if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { + + p1 = ip_getData(mv[0].mvData, TX_DROP); + if( mnum > 1 ) { + p2 = ip_getData(mv[mnum-1].mvData, TX_DROP); + pt = p1-p2; + } + else { pt = p1; } + + //fprintf(stderr,"packets transmitted: %lld\n",pt); + memcpy(v,&pt,sizeof(unsigned long long)); + return sizeof(unsigned long long); + } + return -1; +} + + +/* ---------------------------------------------------------------------------*/ +/* TransmitPacketDropRate */ +/* ---------------------------------------------------------------------------*/ + +size_t metricCalcTransDropRate(MetricValue * mv, + int mnum, + void * v, + size_t vlen) +{ + unsigned long long p1, p2; + unsigned long rate; + +#ifdef DEBUG + fprintf(stderr,"--- %s(%i) : Calculate PacketTransmitRate\n", + __FILE__,__LINE__); +#endif + if (mv && (vlen >= sizeof(unsigned long)) && (mnum >= 2)) { + p1 = ip_getData(mv[0].mvData, TX_DROP); + p2 = ip_getData(mv[mnum-1].mvData, TX_DROP); + + rate = (p1 - p2) / (mv[0].mvTimeStamp - mv[mnum - 1].mvTimeStamp); + + memcpy(v, &rate, sizeof(unsigned long )); + return sizeof(unsigned long); + } + return -1; +} + + +/* ---------------------------------------------------------------------------*/ +/* ReceivePacketDropRate */ +/* ---------------------------------------------------------------------------*/ + +size_t metricCalcRecDropRate(MetricValue * mv, + int mnum, + void * v, + size_t vlen) +{ + unsigned long long p1, p2; + unsigned long rate; + +#ifdef DEBUG + fprintf(stderr,"--- %s(%i) : Calculate PacketTransmitRate\n", + __FILE__,__LINE__); +#endif + if (mv && (vlen >= sizeof(unsigned long)) && (mnum >= 2)) { + p1 = ip_getData(mv[0].mvData, RX_DROP); + p2 = ip_getData(mv[mnum-1].mvData, RX_DROP); + + rate = (p1 - p2) / (mv[0].mvTimeStamp - mv[mnum - 1].mvTimeStamp); + + memcpy(v, &rate, sizeof(unsigned long )); + return sizeof(unsigned long); + } + return -1; +} + + +/* ---------------------------------------------------------------------------*/ /* tool functions on BytesSubmitted */ /* ---------------------------------------------------------------------------*/ Index: metricIPProtocolEndpoint.readme =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricIPProtocolEndpoint.readme,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- metricIPProtocolEndpoint.readme 19 Apr 2011 23:37:38 -0000 1.4 +++ metricIPProtocolEndpoint.readme 15 Nov 2011 04:57:17 -0000 1.5 @@ -23,7 +23,6 @@ The Plugin offers the following metrics : -- BytesSubmitted - BytesTransmitted - BytesReceived - ErrorRate @@ -33,7 +32,14 @@ - PacketReceiveRate - ByteTransmitRate - ByteReceiveRate +- ReceivePacketsDropped +- TransmitPacketsDropped +- ReceivePacketDropRate +- TransmitPacketDropRate +Internal metrics not meant to be consumed : + +- _BytesSubmitted /* ---------------------------------------------------------------------------*/ @@ -50,7 +56,8 @@ Syntax : <bytes received>:<bytes transmitted>: <errors received>:<errors transmitted>: - <packets received>:<packets transmitted> + <packets received>:<packets transmitted>: + <dropped receive>:<dropped transmit>: BytesTransmitted Index: metricIPProtocolEndpoint.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricIPProtocolEndpoint.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- metricIPProtocolEndpoint.c 15 Nov 2011 04:20:53 -0000 1.7 +++ metricIPProtocolEndpoint.c 15 Nov 2011 04:57:17 -0000 1.8 @@ -1,7 +1,7 @@ /* * $Id$ * - * (C) Copyright IBM Corp. 2004, 2009 + * (C) Copyright IBM Corp. 2004, 2009, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -11,7 +11,7 @@ * http://www.opensource.org/licenses/eclipse-1.0.php * * Author: Heidi Neumann <hei...@de...> - * Contributors: + * Contributors: Tyrel Datwyler <ty...@us...> * * Description: * Metrics Gatherer Plugin of the following IP Protocol Endpoint specific @@ -114,8 +114,8 @@ char values[(6*ULL_CHAR_MAX)+6]; size_t bytes_read = 0; int i = 0; - unsigned long long receive_byte, receive_packets, receive_error = 0; - unsigned long long trans_byte, trans_packets, trans_error = 0; + unsigned long long receive_byte, receive_packets, receive_error, receive_drop = 0; + unsigned long long trans_byte, trans_packets, trans_error, trans_drop = 0; #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Retrieving BytesSubmitted\n", @@ -139,16 +139,17 @@ while( (end = strchr(ptr,'\n')) != NULL ) { sscanf(ptr, - " %[^:]: %lld %lld %lld %*s %*s %*s %*s %*s %lld %lld %lld", + " %[^:]: %lld %lld %lld %lld %*s %*s %*s %*s %lld %lld %lld %lld", port, - &receive_byte, &receive_packets, &receive_error, - &trans_byte, &trans_packets, &trans_error); + &receive_byte, &receive_packets, &receive_error, &receive_drop, + &trans_byte, &trans_packets, &trans_error, &trans_drop); /* fprintf(stderr,"[%i] port: %s %lld %lld\n",i,port,receive_byte,receive_packets);*/ memset(values,0,sizeof(values)); - sprintf(values,"%lld:%lld:%lld:%lld:%lld:%lld:", - receive_byte,trans_byte,receive_error,trans_error,receive_packets,trans_packets); + sprintf(values,"%lld:%lld:%lld:%lld:%lld:%lld:%lld:%lld:", + receive_byte,trans_byte,receive_error,trans_error,receive_packets,trans_packets, + receive_drop, trans_drop); mv = calloc(1, sizeof(MetricValue) + (strlen(values)+1) + |
From: Tyrel D. <ty...@us...> - 2011-11-15 04:20:55
|
Update of /cvsroot/sblim/gather/plugin In directory vz-cvs-3.sog:/tmp/cvs-serv15674/plugin Modified Files: metricIPProtocolEndpoint.c repositoryIPProtocolEndpoint.c Log Message: Fixed 3438050: clean up IPProtocolEP raw data parsing Index: repositoryIPProtocolEndpoint.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/repositoryIPProtocolEndpoint.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- repositoryIPProtocolEndpoint.c 13 May 2010 08:03:24 -0000 1.8 +++ repositoryIPProtocolEndpoint.c 15 Nov 2011 04:20:53 -0000 1.9 @@ -1,7 +1,7 @@ /* * $Id$ * - * (C) Copyright IBM Corp. 2004, 2009 + * (C) Copyright IBM Corp. 2004, 2009, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -11,7 +11,7 @@ * http://www.opensource.org/licenses/eclipse-1.0.php * * Author: Heidi Neumann <hei...@de...> - * Contributors: + * Contributors: Tyrel Datwyler <ty...@us...> * * Description: * Repository Plugin of the following IP Protocol Endpoint specific metrics : @@ -64,12 +64,8 @@ /* ---------------------------------------------------------------------------*/ -static unsigned long long ip_getBytesTransmitted( char * data ); -static unsigned long long ip_getBytesReceived( char * data ); -static unsigned long long ip_getPacketsTransmitted( char * data ); -static unsigned long long ip_getPacketsReceived( char * data ); -static unsigned long long ip_getErrorsTransmitted( char * data ); -static unsigned long long ip_getErrorsReceived( char * data ); +enum indices { RX_BYTE, TX_BYTE, RX_ERRS, TX_ERRS, RX_PACK, TX_PACK, RX_DROP, TX_DROP }; +static unsigned long long ip_getData(char * data, char index); /* ---------------------------------------------------------------------------*/ @@ -87,7 +83,7 @@ } metricCalcDef[0].mcVersion=MD_VERSION; - metricCalcDef[0].mcName="BytesSubmitted"; + metricCalcDef[0].mcName="_BytesSubmitted"; metricCalcDef[0].mcId=mr(pluginname,metricCalcDef[0].mcName); metricCalcDef[0].mcMetricType=MD_PERIODIC|MD_RETRIEVED|MD_POINT; metricCalcDef[0].mcIsContinuous=MD_FALSE; @@ -259,9 +255,9 @@ #endif if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { - b1 = ip_getBytesTransmitted(mv[0].mvData); + b1 = ip_getData(mv[0].mvData, TX_BYTE); if( mnum > 1 ) { - b2 = ip_getBytesTransmitted(mv[mnum-1].mvData); + b2 = ip_getData(mv[mnum-1].mvData, TX_BYTE); bt = b1-b2; } else { bt = b1; } @@ -292,9 +288,9 @@ #endif if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { - b1 = ip_getBytesReceived(mv[0].mvData); + b1 = ip_getData(mv[0].mvData, RX_BYTE); if( mnum > 1 ) { - b2 = ip_getBytesReceived(mv[mnum-1].mvData); + b2 = ip_getData(mv[mnum-1].mvData, RX_BYTE); br = b1-b2; } else { br = b1; } @@ -324,8 +320,8 @@ __FILE__,__LINE__); #endif if (mv && (vlen >= sizeof(unsigned long)) && (mnum >= 2)) { - b1 = ip_getBytesTransmitted(mv[0].mvData); - b2 = ip_getBytesTransmitted(mv[mnum-1].mvData); + b1 = ip_getData(mv[0].mvData, TX_BYTE); + b2 = ip_getData(mv[mnum-1].mvData, TX_BYTE); rate = (b1 - b2) / (mv[0].mvTimeStamp - mv[mnum - 1].mvTimeStamp); @@ -353,8 +349,8 @@ __FILE__,__LINE__); #endif if (mv && (vlen >= sizeof(unsigned long)) && (mnum >= 2)) { - b1 = ip_getBytesReceived(mv[0].mvData); - b2 = ip_getBytesReceived(mv[mnum-1].mvData); + b1 = ip_getData(mv[0].mvData, RX_BYTE); + b2 = ip_getData(mv[mnum-1].mvData, RX_BYTE); rate = (b1 - b2) / (mv[0].mvTimeStamp - mv[mnum - 1].mvTimeStamp); @@ -385,11 +381,11 @@ #endif if ( mv && (vlen>=sizeof(float)) && (mnum>=2) ) { - et1 = ip_getErrorsTransmitted(mv[0].mvData); - er1 = ip_getErrorsReceived(mv[0].mvData); + et1 = ip_getData(mv[0].mvData, TX_ERRS); + er1 = ip_getData(mv[0].mvData, RX_ERRS); - et2 = ip_getErrorsTransmitted(mv[mnum-1].mvData); - er2 = ip_getErrorsReceived(mv[mnum-1].mvData); + et2 = ip_getData(mv[mnum-1].mvData, TX_ERRS); + er2 = ip_getData(mv[mnum-1].mvData, RX_ERRS); rate = ( (et1+er1) - (et2+er2) ) / (mv[0].mvTimeStamp - mv[mnum-1].mvTimeStamp); @@ -419,8 +415,8 @@ __FILE__,__LINE__); #endif if (mv && (vlen >= sizeof(unsigned long)) && (mnum >= 2)) { - p1 = ip_getPacketsTransmitted(mv[0].mvData); - p2 = ip_getPacketsTransmitted(mv[mnum-1].mvData); + p1 = ip_getData(mv[0].mvData, TX_PACK); + p2 = ip_getData(mv[mnum-1].mvData, TX_PACK); rate = (p1 - p2) / (mv[0].mvTimeStamp - mv[mnum - 1].mvTimeStamp); @@ -448,8 +444,8 @@ __FILE__,__LINE__); #endif if (mv && (vlen >= sizeof(unsigned long)) && (mnum >= 2)) { - p1 = ip_getPacketsReceived(mv[0].mvData); - p2 = ip_getPacketsReceived(mv[mnum-1].mvData); + p1 = ip_getData(mv[0].mvData, RX_PACK); + p2 = ip_getData(mv[mnum-1].mvData, RX_PACK); rate = (p1 - p2) / (mv[0].mvTimeStamp - mv[mnum - 1].mvTimeStamp); @@ -478,9 +474,9 @@ #endif if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { - p1 = ip_getPacketsTransmitted(mv[0].mvData); + p1 = ip_getData(mv[0].mvData, TX_PACK); if( mnum > 1 ) { - p2 = ip_getPacketsTransmitted(mv[mnum-1].mvData); + p2 = ip_getData(mv[mnum-1].mvData, TX_PACK); pt = p1-p2; } else { pt = p1; } @@ -512,9 +508,9 @@ if ( mv && (vlen>=sizeof(unsigned long long)) && (mnum>=1) ) { - p1 = ip_getPacketsReceived(mv[0].mvData); + p1 = ip_getData(mv[0].mvData, RX_PACK); if( mnum > 1 ) { - p2 = ip_getPacketsReceived(mv[mnum-1].mvData); + p2 = ip_getData(mv[mnum-1].mvData, RX_PACK); pr = p1-p2; } else { pr = p1; } @@ -531,120 +527,28 @@ /* tool functions on BytesSubmitted */ /* ---------------------------------------------------------------------------*/ -unsigned long long ip_getBytesReceived( char * data ) { - - char * hlp = NULL; - char bytes[128]; - unsigned long long val = 0; - - if( (hlp = strchr(data, ':')) != NULL ) { - memset(bytes,0,sizeof(bytes)); - strncpy(bytes, data, (strlen(data)-strlen(hlp)) ); - val = strtoll(bytes,(char**)NULL,10); - } - - return val; -} - - -unsigned long long ip_getBytesTransmitted( char * data ) { - - char * hlp = NULL; - char * end = NULL; - char bytes[128]; - unsigned long long val = 0; - - if( (hlp = strchr(data, ':')) != NULL ) { - hlp++; - end = strchr(hlp, ':'); - memset(bytes,0,sizeof(bytes)); - strncpy(bytes, hlp, (strlen(hlp)-strlen(end)) ); - val = strtoll(bytes,(char**)NULL,10); - } - - return val; -} - - -unsigned long long ip_getErrorsReceived( char * data ) { - char * hlp = NULL; - char * end = NULL; - char bytes[128]; - unsigned long long val = 0; - - if( (hlp = strchr(data, ':')) != NULL ) { - hlp++; - hlp = strchr(hlp, ':'); - hlp++; - end = strchr(hlp, ':'); - memset(bytes,0,sizeof(bytes)); - strncpy(bytes, hlp, (strlen(hlp)-strlen(end)) ); - val = strtoll(bytes,(char**)NULL,10); - } - - return val; -} - - -unsigned long long ip_getErrorsTransmitted( char * data ) { - char * hlp = NULL; - char * end = NULL; - char bytes[128]; - unsigned long long val = 0; - - if( (hlp = strchr(data, ':')) != NULL ) { - hlp++; - hlp = strchr(hlp, ':'); - hlp++; - hlp = strchr(hlp, ':'); - hlp++; - end = strchr(hlp, ':'); - memset(bytes,0,sizeof(bytes)); - strncpy(bytes, hlp, (strlen(hlp)-strlen(end)) ); - val = strtoll(bytes,(char**)NULL,10); - } - - return val; -} - - -unsigned long long ip_getPacketsReceived( char * data ) { - char * hlp = NULL; - char * end = NULL; - char bytes[128]; - unsigned long long val = 0; - - if( (hlp = strchr(data, ':')) != NULL ) { - hlp++; - hlp = strchr(hlp, ':'); - hlp++; - hlp = strchr(hlp, ':'); - hlp++; - hlp = strchr(hlp, ':'); - hlp++; - end = strchr(hlp, ':'); - memset(bytes,0,sizeof(bytes)); - strncpy(bytes, hlp, (strlen(hlp)-strlen(end)) ); - val = strtoll(bytes,(char**)NULL,10); - } - - return val; -} - +unsigned long long ip_getData(char * data, char index) { + char * hlp = NULL; + char * end = NULL; + char bytes[128]; + unsigned long long val = 0; + int i = 0; -unsigned long long ip_getPacketsTransmitted( char * data ) { - char * hlp = NULL; - char bytes[128]; - unsigned long long val = 0; + hlp = data; + if ((end = strchr(hlp, ':')) != NULL) { + for (i = 0; i < index; i++) { + hlp = ++end; + if ((end = strchr(hlp, ':')) == NULL) { + return val; + } + } - if( (hlp = strrchr(data, ':')) != NULL ) { - hlp++; - memset(bytes,0,sizeof(bytes)); - strcpy(bytes, hlp); - val = strtoll(bytes,(char**)NULL,10); - } + memset(bytes, 0, sizeof(bytes)); + strncpy(bytes, hlp, strlen(hlp) - strlen(end)); + val = strtoll(bytes, (char**) NULL, 10); + } - return val; + return val; } Index: metricIPProtocolEndpoint.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricIPProtocolEndpoint.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- metricIPProtocolEndpoint.c 19 Aug 2011 00:17:54 -0000 1.6 +++ metricIPProtocolEndpoint.c 15 Nov 2011 04:20:53 -0000 1.7 @@ -68,7 +68,7 @@ } metricDef[0].mdVersion=MD_VERSION; - metricDef[0].mdName="BytesSubmitted"; + metricDef[0].mdName="_BytesSubmitted"; metricDef[0].mdReposPluginName="librepositoryIPProtocolEndpoint.so"; metricDef[0].mdId=mr(pluginname,metricDef[0].mdName); metricDef[0].mdSampleInterval=60; @@ -115,7 +115,7 @@ size_t bytes_read = 0; int i = 0; unsigned long long receive_byte, receive_packets, receive_error = 0; - unsigned long long trans_byte, trans_packets, trans_error = 0; + unsigned long long trans_byte, trans_packets, trans_error = 0; #ifdef DEBUG fprintf(stderr,"--- %s(%i) : Retrieving BytesSubmitted\n", @@ -141,13 +141,13 @@ sscanf(ptr, " %[^:]: %lld %lld %lld %*s %*s %*s %*s %*s %lld %lld %lld", port, - &receive_byte,&receive_packets,&receive_error, - &trans_byte,&trans_packets,&trans_error); + &receive_byte, &receive_packets, &receive_error, + &trans_byte, &trans_packets, &trans_error); /* fprintf(stderr,"[%i] port: %s %lld %lld\n",i,port,receive_byte,receive_packets);*/ memset(values,0,sizeof(values)); - sprintf(values,"%lld:%lld:%lld:%lld:%lld:%lld", + sprintf(values,"%lld:%lld:%lld:%lld:%lld:%lld:", receive_byte,trans_byte,receive_error,trans_error,receive_packets,trans_packets); mv = calloc(1, sizeof(MetricValue) + |
From: Narasimha S. <nsh...@us...> - 2011-11-08 05:04:33
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5802 Modified Files: ChangeLog Log Message: [3419721] reset CMPIValue buffer in str2CMPIValue Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.696 retrieving revision 1.697 diff -u -d -r1.696 -r1.697 --- ChangeLog 26 Oct 2011 17:15:11 -0000 1.696 +++ ChangeLog 8 Nov 2011 05:04:31 -0000 1.697 @@ -1,3 +1,8 @@ +2011-11-07 Narasimha Sharoff <nsh...@us...> + + * cimXmlGen.c: + [ 3419721 ] reset CMPIValue buffer in str2CMPIValue + 2011-10-26 Michael Chase-Salerno <br...@li...> * providerDrv.c: |
From: Narasimha S. <nsh...@us...> - 2011-11-08 05:03:23
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5597 Modified Files: NEWS Log Message: [3419721] reset CMPIValue buffer in str2CMPIValue Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.620 retrieving revision 1.621 diff -u -d -r1.620 -r1.621 --- NEWS 26 Oct 2011 17:15:11 -0000 1.620 +++ NEWS 8 Nov 2011 05:03:21 -0000 1.621 @@ -8,6 +8,7 @@ - 3416167 CIM_InstDeletion not in class repo by default - 3422650 Associators calls to IndicationService depends on cmpi-base - 3428806 type=null in authorizeFilter call +- 3419721 reset CMPIValue buffer in str2CMPIValue Changes in 1.3.13 ================= |
From: Narasimha S. <nsh...@us...> - 2011-11-08 04:59:16
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv4043 Modified Files: cimXmlGen.c Log Message: [3419721] reset CMPIValue in str2CMPValue buffer Index: cimXmlGen.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlGen.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- cimXmlGen.c 4 Aug 2011 21:40:35 -0000 1.74 +++ cimXmlGen.c 8 Nov 2011 04:59:13 -0000 1.75 @@ -339,6 +339,7 @@ CMPIValue value; CMPIType t = 0; + memset(&value, 0, sizeof(CMPIValue)); if (type==0) { type=guessType(val.value); } |
From: Dave B. <bla...@us...> - 2011-11-07 12:05:54
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv19900/src/org/sblim/cimclient/internal/wbem Modified Files: WBEMClientCIMXML.java Log Message: 3423064 - Add UpdateExpiredPassword Header for Reqs from Java Client Index: WBEMClientCIMXML.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/WBEMClientCIMXML.java,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- WBEMClientCIMXML.java 8 Sep 2011 14:42:15 -0000 1.65 +++ WBEMClientCIMXML.java 7 Nov 2011 12:05:49 -0000 1.66 @@ -55,6 +55,7 @@ * 3185833 2011-02-18 blaschke-oss missing newline when logging request/response * 3197423 2011-03-02 blaschke-oss Server authentication with PegasusLocalAuthInfo failing * 3277928 2011-04-06 blaschke-oss CIM-XML tracing cannot be enabled in the field + * 3423064 2011-10-13 blaschke-oss Add UpdateExpiredPassword Header for Reqs from Java Client */ package org.sblim.cimclient.internal.wbem; @@ -1316,6 +1317,10 @@ hh.addField("CIMObject", HttpHeader.encode(MOF.objectHandle(pName, false, true), "UTF-8", "US-ASCII")); + // sfcb needs pragma set for UpdateExpiredPassword call + if (pMethodName != null && pMethodName.equalsIgnoreCase("UpdateExpiredPassword")) hh + .addField("Pragma", "UpdateExpiredPassword"); + Document doc = this.iXmlHelper.newDocument(); this.iXmlHelper.createCIMMessage(doc, this.iXmlHelper.invokeMethod_request(doc, pName, pMethodName, pInputArguments)); |
From: Dave B. <bla...@us...> - 2011-11-07 11:58:32
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory vz-cvs-3.sog:/tmp/cvs-serv17680/src/org/sblim/cimclient/internal/cimxml Modified Files: CIMXMLParserImpl.java Log Message: 3411944 - createJavaObject exception with hex uint Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- CIMXMLParserImpl.java 31 May 2011 14:23:12 -0000 1.42 +++ CIMXMLParserImpl.java 7 Nov 2011 11:58:30 -0000 1.43 @@ -49,6 +49,7 @@ * 3027615 2010-07-12 blaschke-oss Use CLASS_ARRAY_T instead of new CIMDataType(CLASS,0) * 3293248 2011-05-03 blaschke-oss Support for CIM_ERROR instances within ERROR * 3297028 2011-05-03 blaschke-oss Instances contain CIMClassProperty with DOM parser + * 3411944 2011-09-20 blaschke-oss createJavaObject exception with hex uint */ package org.sblim.cimclient.internal.cimxml; @@ -2981,7 +2982,7 @@ CIMDataType cimType = parseTypeStr(pTypeStr, false); int radix = 10; - if (pTypeStr.toLowerCase().startsWith("sint") || pTypeStr.toLowerCase().startsWith("int")) { + if (pTypeStr.toLowerCase().startsWith("sint") || pTypeStr.toLowerCase().startsWith("uint")) { pValue = pValue.toLowerCase(); if (pValue.startsWith("0x") || pValue.startsWith("+0x") || pValue.startsWith("-0x")) { radix = 16; |
From: Dave B. <bla...@us...> - 2011-11-07 11:54:57
|
Update of /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv16078/utst/org/sblim/cimclient/unittest/wbem Modified Files: CIMBuilder.java Log Message: 3411879 - TCK: CIM element value must match type Index: CIMBuilder.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/wbem/CIMBuilder.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- CIMBuilder.java 12 Jun 2009 02:33:23 -0000 1.18 +++ CIMBuilder.java 7 Nov 2011 11:54:55 -0000 1.19 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2009 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -25,6 +25,7 @@ * 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) * 2797550 2009-06-01 raman_arora JSR48 compliance - add Java Generics + * 3411879 2011-09-20 blaschke-oss TCK: CIM element value must match type */ package org.sblim.cimclient.unittest.wbem; @@ -467,6 +468,21 @@ return cInstA; } + /* + * According to DSP0201, the following CIM data types cannot have null + * values (i.e. uint32 MUST contain at least one digit) + */ + private static int cInvalidNullTypes[] = { CIMDataType.BOOLEAN, CIMDataType.CHAR16, + CIMDataType.DATETIME, CIMDataType.REAL32, CIMDataType.REAL64, CIMDataType.SINT16, + CIMDataType.SINT32, CIMDataType.SINT64, CIMDataType.SINT8, CIMDataType.UINT16, + CIMDataType.UINT32, CIMDataType.UINT64, CIMDataType.UINT8 }; + + private static boolean isInvalidNullType(int pType) { + for (int i = cInvalidNullTypes.length - 1; i >= 0; i--) + if (cInvalidNullTypes[i] == pType) return true; + return false; + } + private static CIMProperty<?>[] cKeyPropA; private static CIMProperty<?>[] cAllPropA; @@ -503,7 +519,8 @@ CIMProperty<Object> prop = new CIMProperty<Object>("KeyProp" + i, pair.getType(), pair .getValue(), true, bit(i, 0), bit(i, 1) ? "KeyPropOrigin" + i : null); cKeyPropA[i] = cAllPropA[i] = prop; - if (i >= cKeyPropA.length / 2 && pair.getType().getType() != CIMDataType.REFERENCE) { + if (i >= cKeyPropA.length / 2 && pair.getType().getType() != CIMDataType.REFERENCE + && !isInvalidNullType(pair.getType().getType())) { CIMProperty<Object> propNull = new CIMProperty<Object>("KeyProp" + i, pair .getType(), null, true, bit(i, 0), bit(i, 1) ? "KeyPropOrigin" + i : null); cKeyPropNullA[i] = cAllPropNullA[i] = propNull; |
From: Chris B. <buc...@us...> - 2011-11-05 01:45:14
|
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 d53481dce97af2bb32d25e025e8d226893f08f72 (commit) from ae10f36918a09a3a0e112a29163bb22b9c8e21a9 (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 d53481dce97af2bb32d25e025e8d226893f08f72 Author: buccella <buc...@li...> Date: Fri Nov 4 21:45:40 2011 -0400 reverted 3023072 ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 0cbbdc1..f47c1a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-04 Chris Buccella <buc...@li...> + + * objectImpl.c: + Reverting part of 3023072 + 2011-10-26 Michael Chase-Salerno <br...@li...> * providerDrv.c: diff --git a/objectImpl.c b/objectImpl.c index a3e5b2c..a668b50 100644 --- a/objectImpl.c +++ b/objectImpl.c @@ -537,6 +537,7 @@ replaceClStringN(ClObjectHdr * hdr, int id, const char *str, unsigned int length free(ts); i = addClStringN(hdr, str, length); + fb = getStrBufPtr(hdr); /* addClString may change the strbufptr */ fb->iUsed--; fb->indexPtr[id - 1] = fb->indexPtr[i - 1]; hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Dave B. <bla...@us...> - 2011-10-31 21:56:45
|
Update of /cvsroot/sblim/cim-client In directory vz-cvs-3.sog:/tmp/cvs-serv24458 Modified Files: Tag: CIM_CLIENT_1_3_9_M build.xml sblim-cim-client.spec NEWS ChangeLog Log Message: 1.3.9.3 release work Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cim-client/NEWS,v retrieving revision 1.44.2.2 retrieving revision 1.44.2.3 diff -u -d -r1.44.2.2 -r1.44.2.3 --- NEWS 29 Sep 2010 22:54:09 -0000 1.44.2.2 +++ NEWS 31 Oct 2011 21:56:42 -0000 1.44.2.3 @@ -1,3 +1,7 @@ +Changes in 1.3.9.3 +================== +3160431 Need to support property file on AIX. + Changes in 1.3.9.2 ================== 3078216 Fix for a null pointer exception in 1.3.9.1 Index: sblim-cim-client.spec =================================================================== RCS file: /cvsroot/sblim/cim-client/sblim-cim-client.spec,v retrieving revision 1.12.2.4 retrieving revision 1.12.2.5 diff -u -d -r1.12.2.4 -r1.12.2.5 --- sblim-cim-client.spec 30 Sep 2010 15:50:07 -0000 1.12.2.4 +++ sblim-cim-client.spec 31 Oct 2011 21:56:42 -0000 1.12.2.5 @@ -1,6 +1,6 @@ %define name sblim-cim-client %define archive_folder_name cim-client -%define version 1.3.9.2 +%define version 1.3.9.3 %define release 1jpp %define section free %define cim_client_jar_file sblimCIMClient @@ -154,6 +154,10 @@ # ----------------------------------------------------------------------------- %changelog +* Mon Oct 31 2011 Dave Blaschke <bla...@us...> +- Maintenance release 1.3.9.3 + o 3160431 Need to support property file on AIX. + * Thu Sep 30 2010 Dave Blaschke <bla...@us...> - Maintenance release 1.3.9.2 o 3078216 Fix for a null pointer exception in 1.3.9.1 Index: build.xml =================================================================== RCS file: /cvsroot/sblim/cim-client/build.xml,v retrieving revision 1.23.2.3 retrieving revision 1.23.2.4 diff -u -d -r1.23.2.3 -r1.23.2.4 --- build.xml 30 Sep 2010 15:50:07 -0000 1.23.2.3 +++ build.xml 31 Oct 2011 21:56:42 -0000 1.23.2.4 @@ -1,7 +1,7 @@ <!-- build.xml - (C) Copyright IBM Corp. 2005, 2010 + (C) Copyright IBM Corp. 2005, 2011 THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -32,11 +32,11 @@ <!-- set global properties for this build --> <property environment="env" /> - <property name="Base.copyright" value="(C) Copyright IBM Corp. 2005, 2010" /> + <property name="Base.copyright" value="(C) Copyright IBM Corp. 2005, 2011" /> <property name="Manifest.name" value="SBLIM CIM Client" /> <property name="Manifest.title" value="SBLIM CIM Client" /> - <property name="Manifest.vendor" value="IBM Corporation 2005, 2010" /> - <property name="Manifest.version" value="1.3.9.2" /> + <property name="Manifest.vendor" value="IBM Corporation 2005, 2011" /> + <property name="Manifest.version" value="1.3.9.3" /> <property name="packagedir" value="cim-client" /> <property name="builddir" value="${basedir}/${packagedir}" /> @@ -159,7 +159,7 @@ title="Packages containing the internal implementation" packages="org.sblim.wbem.cimxml*:org.sblim.wbem.http*:org.sblim.wbem.xml*:org.sblim.slp.internal"/> <doctitle><![CDATA[<h1>SBLIM CIM Client - ${Manifest.version} - Public API Specification</h1>]]></doctitle> - <bottom><![CDATA[<i>Copyright © 2005, 2010 IBM Corporation. All Rights Reserved.</i>]]></bottom> + <bottom><![CDATA[<i>Copyright © 2005, 2011 IBM Corporation. All Rights Reserved.</i>]]></bottom> <fileset dir="${basedir}" includes="**/*.java" Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cim-client/ChangeLog,v retrieving revision 1.17.2.2 retrieving revision 1.17.2.3 diff -u -d -r1.17.2.2 -r1.17.2.3 --- ChangeLog 29 Sep 2010 22:54:09 -0000 1.17.2.2 +++ ChangeLog 31 Oct 2011 21:56:42 -0000 1.17.2.3 @@ -1,4 +1,14 @@ // ========================================================================= +// new in version 1.3.9.3 + +Tue Jan 18 10:10:12 CST 2011 blaschke-oss + + 3160431 Need to support property file on AIX. + + SessionProperties.java 1.12.2.2 + configuration.html 1.3.2.1 + +// ========================================================================= // new in version 1.3.9.2 Wed Sep 29 17:42:55 CDT 2010 blaschke-oss |
From: Dave H. <hel...@us...> - 2011-10-27 16:46:34
|
Update of /cvsroot/sblim/gather In directory vz-cvs-3.sog:/tmp/cvs-serv22357 Modified Files: NEWS gatherer.init-redhat.in Log Message: Fixed 3429347: initscript incorrect return code Index: NEWS =================================================================== RCS file: /cvsroot/sblim/gather/NEWS,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 --- NEWS 27 Oct 2011 16:33:10 -0000 1.110 +++ NEWS 27 Oct 2011 16:46:32 -0000 1.111 @@ -7,6 +7,7 @@ - 3419837 bad alloc and unsigned returns in metricVirt - 3397109 UnixProcess plugins occasionally crashes - 3429346 libvirt race conditions +- 3429347 initscript incorrect return code Changes in Version 2.2.3 ======================== Index: gatherer.init-redhat.in =================================================================== RCS file: /cvsroot/sblim/gather/gatherer.init-redhat.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gatherer.init-redhat.in 2 Jun 2010 01:41:20 -0000 1.2 +++ gatherer.init-redhat.in 27 Oct 2011 16:46:32 -0000 1.3 @@ -68,9 +68,9 @@ ;; status) status gatherd - RETVAL=$? + GATHERD_RETVAL=$? status reposd - RETVAL=$? + RETVAL=$(( $GATHERD_RETVAL == 0 ? $? : $GATHERD_RETVAL )) ;; force-reload) reload |
From: Dave H. <hel...@us...> - 2011-10-27 16:33:12
|
Update of /cvsroot/sblim/gather In directory vz-cvs-3.sog:/tmp/cvs-serv21617 Modified Files: NEWS Log Message: Fixed 3429346: libvirt race conditions Index: NEWS =================================================================== RCS file: /cvsroot/sblim/gather/NEWS,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- NEWS 18 Oct 2011 22:38:42 -0000 1.109 +++ NEWS 27 Oct 2011 16:33:10 -0000 1.110 @@ -6,6 +6,7 @@ - 3412635 bad string allocations - 3419837 bad alloc and unsigned returns in metricVirt - 3397109 UnixProcess plugins occasionally crashes +- 3429346 libvirt race conditions Changes in Version 2.2.3 ======================== |
From: Michael Chase-S. <mc...@us...> - 2011-10-27 04:58:01
|
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 ae10f36918a09a3a0e112a29163bb22b9c8e21a9 (commit) via 072484d4b0dc5c2218c6dc3d01b8cda8ebde6005 (commit) from 6837ecbf4ba89e35bc7f5c210157054db3cc873a (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 ae10f36918a09a3a0e112a29163bb22b9c8e21a9 Author: Michael Chase-Salerno <br...@li...> Date: Thu Oct 27 00:56:58 2011 -0400 [ 3428806 ] type=null in authorizeFilter call commit 072484d4b0dc5c2218c6dc3d01b8cda8ebde6005 Author: Michael Chase-Salerno <br...@li...> Date: Thu Oct 27 00:55:12 2011 -0400 [ 3428806 ] type=null in authorizeFilter call ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index ceb80b6..0cbbdc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-10-26 Michael Chase-Salerno <br...@li...> + + * providerDrv.c: + [ 3428806 ] type=null in authorizeFilter call + 2011-10-13 Chris Buccella <buc...@li...> * indication.mof: diff --git a/providerDrv.c b/providerDrv.c index 3ebef6e..efc58f4 100644 --- a/providerDrv.c +++ b/providerDrv.c @@ -2520,7 +2520,7 @@ activateFilter(BinRequestHdr * hdr, ProviderInfo * info, int requestor) CMPIContext *ctx = native_new_CMPIContext(MEM_TRACKED, info); CMPIResult *result = native_new_CMPIResult(0, 1, NULL); CMPIFlags flgs = 0; - char *type = NULL; + char *type = (char *) req->type.data; ctx->ft->addEntry(ctx, CMPIInvocationFlags, (CMPIValue *) & flgs, CMPI_uint32); @@ -2541,7 +2541,6 @@ activateFilter(BinRequestHdr * hdr, ProviderInfo * info, int requestor) if (se == NULL) { char *query = (char *) req->query.data; char *lang = (char *) req->language.data; - type = (char *) req->type.data; char *sns = (char *) req->sns.data; se = (NativeSelectExp *) NewCMPISelectExp(query, lang, sns, NULL, hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2011-10-26 17:15:13
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv9458 Modified Files: ChangeLog NEWS providerDrv.c Log Message: 3428806 type=null in authorizeFilter call Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.619 retrieving revision 1.620 diff -u -d -r1.619 -r1.620 --- NEWS 13 Oct 2011 19:46:40 -0000 1.619 +++ NEWS 26 Oct 2011 17:15:11 -0000 1.620 @@ -7,6 +7,7 @@ - 3416055 SIGSEGV sometimes does not print provider name - 3416167 CIM_InstDeletion not in class repo by default - 3422650 Associators calls to IndicationService depends on cmpi-base +- 3428806 type=null in authorizeFilter call Changes in 1.3.13 ================= Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- providerDrv.c 30 Sep 2011 17:14:05 -0000 1.103 +++ providerDrv.c 26 Oct 2011 17:15:11 -0000 1.104 @@ -2146,7 +2146,7 @@ CMPIResult *result = native_new_CMPIResult(0,1,NULL); CMPIFlags flgs=0; int makeActive=0; - char *type = NULL; + char *type=(char*)req->type.data; ctx->ft->addEntry(ctx,CMPIInvocationFlags,(CMPIValue*)&flgs,CMPI_uint32); ctx->ft->addEntry(ctx,CMPIPrincipal,(CMPIValue*)req->principal.data,CMPI_chars); @@ -2161,7 +2161,6 @@ if (se==NULL) { char *query=(char*)req->query.data; char *lang=(char*)req->language.data; - type=(char*)req->type.data; char *sns=(char*)req->sns.data; se=(NativeSelectExp*)NewCMPISelectExp(query,lang,sns,NULL,&rci); Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.695 retrieving revision 1.696 diff -u -d -r1.695 -r1.696 --- ChangeLog 13 Oct 2011 19:46:40 -0000 1.695 +++ ChangeLog 26 Oct 2011 17:15:11 -0000 1.696 @@ -1,3 +1,8 @@ +2011-10-26 Michael Chase-Salerno <br...@li...> + + * providerDrv.c: + [ 3428806 ] type=null in authorizeFilter call + 2011-10-13 Chris Buccella <buc...@li...> * indication.mof: |
From: Tyrel D. <ty...@us...> - 2011-10-18 22:38:45
|
Update of /cvsroot/sblim/gather/plugin In directory vz-cvs-3.sog:/tmp/cvs-serv21870/plugin Modified Files: metricUnixProcess.c Log Message: Fixed 3397109 UnixProcess plugins occasionally crashes (patch by Vitezslav Crhonek) Index: metricUnixProcess.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricUnixProcess.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- metricUnixProcess.c 22 Sep 2011 23:40:09 -0000 1.16 +++ metricUnixProcess.c 18 Oct 2011 22:38:43 -0000 1.17 @@ -38,6 +38,8 @@ #include <sys/types.h> #include <dirent.h> +#define BUFSIZE 1024 + /* ---------------------------------------------------------------------------*/ static MetricDefinition metricDef[6]; @@ -170,8 +172,8 @@ char * ptr = NULL; char * end = NULL; char * hlp = NULL; - char * procname = NULL; - char * resname = NULL; + char procname[BUFSIZE]; + char resname[2*BUFSIZE]; char buf[4096]; char os_buf[4096]; int _enum_size = 0; @@ -221,7 +223,7 @@ strcat(buf,_enum_pid + (i*64)); strcat(buf,"/stat"); if( (fhd = fopen(buf,"r")) != NULL ) { - fscanf(fhd,"%as %as %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %lld %lld", + fscanf(fhd,"%s %s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %lld %lld", &resname, &procname, &u_time,&k_time ); @@ -229,9 +231,7 @@ /* remove parens from procname and concatenate as "pid.procname" */ procname[0] = '.'; procname[strlen(procname) - 1] = 0; - resname = realloc(resname, strlen(resname) + strlen(procname) + 1); strcat(resname, procname); - free(procname); fclose(fhd); } @@ -252,7 +252,6 @@ strncpy( mv->mvData, buf, strlen(buf) ); mv->mvResource = (char*)mv + sizeof(MetricValue) + (strlen(buf)+1); strcpy(mv->mvResource,resname); - free(resname); mret(mv); } } @@ -273,8 +272,8 @@ MetricValue * mv = NULL; FILE * fhd = NULL; char * _enum_pid = NULL; - char * resname = NULL; - char * procname = NULL; + char resname[2*BUFSIZE]; + char procname[BUFSIZE]; char buf[254]; int _enum_size = 0; int i = 0; @@ -303,7 +302,7 @@ strcat(buf,_enum_pid + (i*64)); strcat(buf,"/stat"); if( (fhd = fopen(buf,"r")) != NULL ) { - fscanf(fhd,"%as %as %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s " + fscanf(fhd,"%s %s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s " "%*s %*s %*s %*s %*s %*s %*s %*s %*s %lld %*s", &resname, &procname, @@ -312,9 +311,7 @@ /* remove parens from procname and concatenate as "pid.procname" */ procname[0] = '.'; procname[strlen(procname) - 1] = 0; - resname = realloc(resname, strlen(resname) + strlen(procname) + 1); strcat(resname, procname); - free(procname); fclose(fhd); size = rss * sysconf(_SC_PAGESIZE); @@ -332,7 +329,6 @@ *(unsigned long long *)mv->mvData = htonll(size); mv->mvResource = (char*)mv + sizeof(MetricValue) + sizeof(unsigned long long); strcpy(mv->mvResource,resname); - free(resname); mret(mv); } } @@ -353,8 +349,8 @@ MetricValue * mv = NULL; FILE * fhd = NULL; char * _enum_pid = NULL; - char * resname = NULL; - char * procname = NULL; + char resname[2*BUFSIZE]; + char procname[BUFSIZE]; char buf[254]; int _enum_size = 0; int i = 0; @@ -383,7 +379,7 @@ strcat(buf,"/stat"); if( (fhd = fopen(buf,"r")) != NULL ) { fscanf(fhd, - "%as %as %*s %*s %*s %*s %*s %*s %*s %*s %*s %lld", + "%s %s %*s %*s %*s %*s %*s %*s %*s %*s %*s %lld", &resname, &procname, &page); @@ -391,9 +387,7 @@ /* remove parens from procname and concatenate as "pid.procname" */ procname[0] = '.'; procname[strlen(procname) - 1] = 0; - resname = realloc(resname, strlen(resname) + strlen(procname) + 1); strcat(resname, procname); - free(procname); fclose(fhd); } @@ -410,7 +404,6 @@ *(unsigned long long*)mv->mvData = htonll(page); mv->mvResource = (char*)mv + sizeof(MetricValue) + sizeof(unsigned long long); strcpy(mv->mvResource,resname); - free(resname); mret(mv); } } @@ -431,8 +424,8 @@ MetricValue * mv = NULL; FILE * fhd = NULL; char * _enum_pid = NULL; - char * resname = NULL; - char * procname = NULL; + char resname[2*BUFSIZE]; + char procname[BUFSIZE]; char buf[254]; int _enum_size = 0; int i = 0; @@ -461,7 +454,7 @@ strcat(buf,"/stat"); if( (fhd = fopen(buf,"r")) != NULL ) { fscanf(fhd, - "%as %as %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s " + "%s %s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s " "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s " "%*s %*s %*s %*s %lld", &resname, @@ -471,9 +464,7 @@ /* remove parens from procname and concatenate as "pid.procname" */ procname[0] = '.'; procname[strlen(procname) - 1] = 0; - resname = realloc(resname, strlen(resname) + strlen(procname) + 1); strcat(resname, procname); - free(procname); fclose(fhd); } @@ -490,7 +481,6 @@ *(unsigned long long*)mv->mvData = htonll(page); mv->mvResource = (char*)mv + sizeof(MetricValue) + sizeof(unsigned long long); strcpy(mv->mvResource,resname); - free(resname); mret(mv); } } @@ -511,8 +501,8 @@ MetricValue * mv = NULL; FILE * fhd = NULL; char * _enum_pid = NULL; - char * resname = NULL; - char * procname = NULL; + char resname[2*BUFSIZE]; + char procname[BUFSIZE]; char buf[254]; int _enum_size = 0; int i = 0; @@ -539,7 +529,7 @@ strcat(buf,_enum_pid + (i*64)); strcat(buf,"/stat"); if( (fhd = fopen(buf,"r")) != NULL ) { - fscanf(fhd,"%as %as %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s " + fscanf(fhd,"%s %s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s " "%*s %*s %*s %*s %*s %*s %*s %*s %lld", &resname, &procname, @@ -548,9 +538,7 @@ /* remove parens from procname and concatenate as "pid.procname" */ procname[0] = '.'; procname[strlen(procname) - 1] = 0; - resname = realloc(resname, strlen(resname) + strlen(procname) + 1); strcat(resname, procname); - free(procname); fclose(fhd); } @@ -567,7 +555,6 @@ *(unsigned long long *)mv->mvData = htonll(size); mv->mvResource = (char*)mv + sizeof(MetricValue) + sizeof(unsigned long long); strcpy(mv->mvResource,resname); - free(resname); mret(mv); } } @@ -588,8 +575,8 @@ MetricValue * mv = NULL; FILE * fhd = NULL; char * _enum_pid = NULL; - char * resname = NULL; - char * procname = NULL; + char resname[2*BUFSIZE]; + char procname[BUFSIZE]; char buf[254]; int _enum_size = 0; int i = 0; @@ -626,14 +613,12 @@ strcat(buf,_enum_pid + (i*64)); strcat(buf,"/stat"); if ((fhd = fopen(buf,"r")) != NULL) { - fscanf(fhd,"%as %as", &resname, &procname); + fscanf(fhd,"%s %s", &resname, &procname); /* remove parens from procname and concatenate as "pid.procname" */ procname[0] = '.'; procname[strlen(procname) - 1] = 0; - resname = realloc(resname, strlen(resname) + strlen(procname) + 1); strcat(resname, procname); - free(procname); fclose(fhd); } @@ -652,7 +637,6 @@ *(unsigned long long *)mv->mvData = htonll(size); mv->mvResource = (char*)mv + sizeof(MetricValue) + sizeof(unsigned long long); strcpy(mv->mvResource,resname); - free(resname); mret(mv); } } |
From: Dave B. <bla...@us...> - 2011-10-13 21:06:44
|
Update of /cvsroot/sblim/jsr48-client/src/javax/cim In directory vz-cvs-3.sog:/tmp/cvs-serv3971/src/javax/cim Modified Files: CIMElement.java Log Message: 3410126 - TCK: CIM element name cannot be null Index: CIMElement.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMElement.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- CIMElement.java 18 Feb 2010 21:50:01 -0000 1.13 +++ CIMElement.java 13 Oct 2011 21:06:41 -0000 1.14 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -21,6 +21,7 @@ * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2795671 2009-05-22 raman_arora Add Type to Comparable <T> * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 + * 3410126 2011-09-15 blaschke-oss TCK: CIM element name cannot be null */ package javax.cim; @@ -48,6 +49,7 @@ * The string for the name of the element. */ public CIMElement(String pName) { + if (pName == null) throw new IllegalArgumentException("CIM element name cannot be null"); this.iName = pName; } |
From: Dave B. <bla...@us...> - 2011-10-13 20:03:59
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv25945/src/org/sblim/cimclient/internal/wbem Modified Files: Tag: Experimental WBEMClientCIMXML.java Log Message: 3423064 - Add UpdateExpiredPassword Header for Reqs from Java Client Index: WBEMClientCIMXML.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/WBEMClientCIMXML.java,v retrieving revision 1.21.2.53 retrieving revision 1.21.2.54 diff -u -d -r1.21.2.53 -r1.21.2.54 --- WBEMClientCIMXML.java 6 Apr 2011 23:04:36 -0000 1.21.2.53 +++ WBEMClientCIMXML.java 13 Oct 2011 20:03:56 -0000 1.21.2.54 @@ -55,6 +55,7 @@ * 3185833 2011-02-18 blaschke-oss missing newline when logging request/response * 3197423 2011-03-02 blaschke-oss Server authentication with PegasusLocalAuthInfo failing * 3277928 2011-04-06 blaschke-oss CIM-XML tracing cannot be enabled in the field + * 3423064 2011-10-13 blaschke-oss Add UpdateExpiredPassword Header for Reqs from Java Client */ package org.sblim.cimclient.internal.wbem; @@ -1316,6 +1317,10 @@ hh.addField("CIMObject", HttpHeader.encode(MOF.objectHandle(pName, false, true), "UTF-8", "US-ASCII")); + // sfcb needs pragma set for UpdateExpiredPassword call + if (pMethodName != null && pMethodName.equalsIgnoreCase("UpdateExpiredPassword")) hh + .addField("Pragma", "UpdateExpiredPassword"); + Document doc = this.iXmlHelper.newDocument(); this.iXmlHelper.createCIMMessage(doc, this.iXmlHelper.invokeMethod_request(doc, pName, pMethodName, pInputArguments)); |