summaryrefslogtreecommitdiffstats
path: root/source4/lib
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
parente0e6e0f99d9c7645e1809a3bde1a6ab01843de67 (diff)
downloadsamba-6d3c74a67b935f348777feb3fac7653a9c4277a8.tar.gz
samba-6d3c74a67b935f348777feb3fac7653a9c4277a8.tar.xz
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')
-rw-r--r--source4/lib/dcom/common/dcom.h30
-rw-r--r--source4/lib/dcom/common/main.c57
2 files changed, 62 insertions, 25 deletions
diff --git a/source4/lib/dcom/common/dcom.h b/source4/lib/dcom/common/dcom.h
new file mode 100644
index 00000000000..871bead3769
--- /dev/null
+++ b/source4/lib/dcom/common/dcom.h
@@ -0,0 +1,30 @@
+/*
+ Unix SMB/CIFS implementation.
+ DCOM standard objects
+ Copyright (C) Jelmer Vernooij 2004.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _DCOM_H /* _DCOM_H */
+#define _DCOM_H
+
+struct dcom_interface
+{
+ struct dcerpc_pipe *pipe;
+ struct GUID ipid; /* Appears in object field */
+};
+
+#endif /* _DCOM_H */
diff --git a/source4/lib/dcom/common/main.c b/source4/lib/dcom/common/main.c
index a490c32c145..f567b639e50 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;
}