Update of /cvsroot/sblim/sfcb
In directory vz-cvs-3.sog:/tmp/cvs-serv24458
Modified Files:
providerMgr.c ChangeLog NEWS
Log Message:
[ 3495806 ] isChild() can cause a provider mismatch
Index: NEWS
===================================================================
RCS file: /cvsroot/sblim/sfcb/NEWS,v
retrieving revision 1.645
retrieving revision 1.646
diff -u -d -r1.645 -r1.646
--- NEWS 29 Feb 2012 23:12:44 -0000 1.645
+++ NEWS 29 Feb 2012 23:28:19 -0000 1.646
@@ -36,6 +36,7 @@
- 3416164 Don't write CIM_IndicationService to disk
- 3495801 Correction to 3495343
- 3495789 Makefile improvements for test suite
+- 3495806 isChild() can cause a provider mismatch
Changes in 1.3.13
=================
Index: providerMgr.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/providerMgr.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- providerMgr.c 3 Feb 2012 16:45:57 -0000 1.75
+++ providerMgr.c 29 Feb 2012 23:28:19 -0000 1.76
@@ -1530,31 +1530,60 @@
int isChild(const char *ns, const char *parent, const char* child)
{
- _SFCB_ENTER(TRACE_PROVIDERMGR, "isChild");
-
- CMPIObjectPath *path;
+ CMPIObjectPath *path;
+ CMPIStatus rc;
+ InvokeMethodReq sreq = BINREQ(OPS_InvokeMethod,5);
+ BinResponseHdr *resp=NULL;
BinRequestContext binCtx;
- OperationHdr req = { OPS_InvokeMethod, 1 };
- CMPIArgs *in = NewCMPIArgs(NULL);
- CMPIStatus rc;
- int irc;
-
- memset(&binCtx,0,sizeof(BinRequestContext));
+ OperationHdr req = { OPS_InvokeMethod, 2 };
+ CMPIArgs *in;
+ int irc;
+
+ _SFCB_ENTER(TRACE_PROVIDERMGR, "isChild");
+
+ path = TrackedCMPIObjectPath(ns, parent, &rc);
+ sreq.principal = setCharsMsgSegment("$$");
+ sreq.objectPath = setObjectPathMsgSegment(path);
+
+ in = TrackedCMPIArgs(&rc);
CMAddArg(in, "child", child, CMPI_chars);
- path = NewCMPIObjectPath(ns, parent, &rc);
+ sreq.in = setArgsMsgSegment(in);
+ sreq.out = setArgsMsgSegment(NULL);
+ sreq.method = setCharsMsgSegment("isChild");
+
req.nameSpace = setCharsMsgSegment((char *) ns);
- req.className = setCharsMsgSegment("$ClassProvider$");
+ req.className = setCharsMsgSegment((char *) "$ClassProvider$");
- irc = _methProvider(&binCtx, &req);
+ memset(&binCtx,0,sizeof(BinRequestContext));
+ binCtx.oHdr = &req;
+ binCtx.bHdr = &sreq.hdr;
+ binCtx.bHdrSize = sizeof(sreq);
+ binCtx.chunkedMode=binCtx.xmlAs=binCtx.noResp=0;
+ lockUpCall(Broker);
+
+ irc = getProviderContext(&binCtx, &req);
+
if (irc == MSG_X_PROVIDER) {
- localInvokeMethod(&binCtx, path, "ischild", in, NULL, &rc,0);
- irc=(rc.rc==CMPI_RC_OK);
+ _SFCB_TRACE(1, ("--- Invoking Provider"));
+ resp = invokeProvider(&binCtx);
+ resp->rc--;
+ irc = (resp->rc == CMPI_RC_OK);
+ }
+ else {
+ mlogf(M_ERROR,M_SHOW,"-- no provider context isChild(%s:%s:%s)\n",
+ ns, parent, child);
+ irc = 0;
}
- else irc=0;
- CMRelease(path);
- CMRelease(in);
+ unlockUpCall(Broker);
+
+ if(resp) free(resp);
+ if(!localMode){
+ close(binCtx.provA.socket);
+ }
+ closeProviderContext(&binCtx);
+
_SFCB_RETURN(irc);
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/sblim/sfcb/ChangeLog,v
retrieving revision 1.722
retrieving revision 1.723
diff -u -d -r1.722 -r1.723
--- ChangeLog 29 Feb 2012 23:12:44 -0000 1.722
+++ ChangeLog 29 Feb 2012 23:28:19 -0000 1.723
@@ -1,5 +1,9 @@
2012-02-29 Chris Buccella <buc...@li...>
+ * providerMgr.c:
+ [ 3495806 ] isChild() can cause a provider mismatch
+ (patch by Viktor Mihajlovski)
+
* Makefile.am, test/Makefile.am, test/TestProviders/tests/IndRetryTest.sh,
test/TestProviders/tests/Makefile.am, test/TestProviders/tests/xmltest.sh,
test/commands/Makefile.am, test/commands/sfcbdump.sh,
|