summaryrefslogtreecommitdiff
path: root/source4/lib/dcom/common/main.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-03 20:32:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:23 -0500
commit6d3c74a67b935f348777feb3fac7653a9c4277a8 (patch)
treebf051f28dabe9bd91ea5d39f3b7ba38bdb77cc88 /source4/lib/dcom/common/main.c
parente0e6e0f99d9c7645e1809a3bde1a6ab01843de67 (diff)
downloadsamba-6d3c74a67b935f348777feb3fac7653a9c4277a8.tar.gz
samba-6d3c74a67b935f348777feb3fac7653a9c4277a8.tar.bz2
samba-6d3c74a67b935f348777feb3fac7653a9c4277a8.zip
r3513: Add (the infrastructure for) DCOM support. Contents:
- Support for sending over the object UUID in DCERPC calls - Simple torture test for the DCOM "Simple" object - Generate extra argument for "object" interfaces in pidl - Some stubs for common DCOM functions (This used to be commit c052f2e1edd816206d8974af3140cec7ef97a70c)
Diffstat (limited to 'source4/lib/dcom/common/main.c')
-rw-r--r--source4/lib/dcom/common/main.c57
1 files changed, 32 insertions, 25 deletions
diff --git a/source4/lib/dcom/common/main.c b/source4/lib/dcom/common/main.c
index a490c32c14..f567b639e5 100644
--- a/source4/lib/dcom/common/main.c
+++ b/source4/lib/dcom/common/main.c
@@ -34,9 +34,39 @@ static WERROR dcom_tower_from_oxid(TALLOC_CTX *mem_ctx, HYPER_T oxid, struct epm
return WERR_NOT_SUPPORTED;
}
-static WERROR dcom_get_class_object (struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct GUID clsid)
+static WERROR dcom_create_instance (struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct GUID clsid)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+static uint32 IUnknown_AddRef(void)
+{
+ /* FIXME: Tell local server we're adding a reference to this interface on this object. Local server can then call RemAddRef() if necessary */
+ return 0;
+}
+
+static uint32 IUnknown_Release(void)
+{
+ /* FIXME: Tell local server we're releasing a reference to this interface on this object. Local server can then call RemRelease() if necessary */
+ return 0;
+}
+
+static WERROR IUnknown_QueryInterface(struct GUID *riid, void **data)
+{
+ /* FIXME: Ask local server for interface pointer. Local server can then
+ * call RemQueryInterface if necessary */
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR dcom_create_object(TALLOC_CTX *mem_ctx, struct GUID *clsid, const char *server, int num_ifaces, struct GUID *iid, struct dcom_interface **ip)
+{
+ return WERR_NOT_SUPPORTED;
+}
+
+WERROR dcom_get_class_object(TALLOC_CTX *mem_ctx, struct GUID *clsid, const char *server, struct GUID *iid, struct dcom_interface **ip)
{
struct RemoteActivation r;
+ struct dcerpc_pipe *p = NULL; /* FIXME */
NTSTATUS status;
struct GUID iids[2];
uint16 protseq[3] = { EPM_PROTOCOL_TCP, EPM_PROTOCOL_NCALRPC, EPM_PROTOCOL_UUID };
@@ -45,7 +75,7 @@ static WERROR dcom_get_class_object (struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.this.version.MajorVersion = 5;
r.in.this.version.MinorVersion = 1;
uuid_generate_random(&r.in.this.cid);
- r.in.Clsid = clsid;
+ r.in.Clsid = *clsid;
r.in.ClientImpLevel = RPC_C_IMP_LEVEL_IDENTIFY;
r.in.num_protseqs = 3;
r.in.protseq = protseq;
@@ -64,29 +94,6 @@ static WERROR dcom_get_class_object (struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
if(!W_ERROR_IS_OK(r.out.hr)) { return r.out.hr; }
if(!W_ERROR_IS_OK(r.out.results[0])) { return r.out.results[0]; }
- return WERR_OK;
-}
-static WERROR dcom_create_instance (struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct GUID clsid)
-{
- return WERR_NOT_SUPPORTED;
-}
-
-static uint32 IUnknown_AddRef(void)
-{
- /* FIXME: Tell local server we're adding a reference to this interface on this object. Local server can then call RemAddRef() if necessary */
- return 0;
-}
-
-static uint32 IUnknown_Release(void)
-{
- /* FIXME: Tell local server we're releasing a reference to this interface on this object. Local server can then call RemRelease() if necessary */
- return 0;
-}
-
-static WERROR IUnknown_QueryInterface(struct GUID *riid, void **data)
-{
- /* FIXME: Ask local server for interface pointer. Local server can then
- * call RemQueryInterface if necessary */
return WERR_NOT_SUPPORTED;
}