|
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)
|