summaryrefslogtreecommitdiff
path: root/source4/lib/dcom
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/dcom')
-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 0000000000..871bead376
--- /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 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;
}