summaryrefslogtreecommitdiff
path: root/source4/rpc_server
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/rpc_server
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/rpc_server')
-rw-r--r--source4/rpc_server/dcom/dcom.h51
-rw-r--r--source4/rpc_server/dcom/oxidresolver.c18
-rw-r--r--source4/rpc_server/dcom/remact.c30
-rw-r--r--source4/rpc_server/remote/dcesrv_remote.c2
4 files changed, 85 insertions, 16 deletions
diff --git a/source4/rpc_server/dcom/dcom.h b/source4/rpc_server/dcom/dcom.h
new file mode 100644
index 0000000000..4fdcd0e0e6
--- /dev/null
+++ b/source4/rpc_server/dcom/dcom.h
@@ -0,0 +1,51 @@
+/*
+ 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_class
+{
+ const char *name;
+ struct GUID CLSID;
+
+ /* List of IID's implemented */
+ uint32 cIIDs;
+ struct GUID *IID;
+
+ /* Pointers to functions this class implements */
+};
+
+struct dcom_object
+{
+ struct dcom_class *class;
+ struct GUID oid;
+ HYPER_T OXID;
+ struct dcom_interface_pointer *interfaces;
+ void *private_data;
+};
+
+struct dcom_interface_pointer
+{
+ struct dcom_object *object;
+ struct GUID ipid;
+};
+
+#endif /* _DCOM_H */
diff --git a/source4/rpc_server/dcom/oxidresolver.c b/source4/rpc_server/dcom/oxidresolver.c
index 41baf1c7ad..213802fade 100644
--- a/source4/rpc_server/dcom/oxidresolver.c
+++ b/source4/rpc_server/dcom/oxidresolver.c
@@ -46,8 +46,7 @@ struct PingSet
/*
ResolveOxid
*/
-static WERROR ResolveOxid(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct ResolveOxid *r)
+static WERROR ResolveOxid(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ResolveOxid *r)
{
return WERR_NOT_SUPPORTED;
}
@@ -56,8 +55,7 @@ static WERROR ResolveOxid(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ct
/*
SimplePing
*/
-static WERROR SimplePing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct SimplePing *r)
+static WERROR SimplePing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct SimplePing *r)
{
return WERR_NOT_SUPPORTED;
}
@@ -65,8 +63,7 @@ static WERROR SimplePing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx
/*
ComplexPing
*/
-static WERROR ComplexPing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct ComplexPing *r)
+static WERROR ComplexPing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ComplexPing *r)
{
/* struct PingSet *ps; */
@@ -81,8 +78,7 @@ static WERROR ComplexPing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ct
/*
ServerAlive
*/
-static WERROR ServerAlive(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct ServerAlive *r)
+static WERROR ServerAlive(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ServerAlive *r)
{
return WERR_OK;
}
@@ -91,8 +87,7 @@ static WERROR ServerAlive(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ct
/*
ResolveOxid2
*/
-static WERROR ResolveOxid2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct ResolveOxid2 *r)
+static WERROR ResolveOxid2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ResolveOxid2 *r)
{
return WERR_NOT_SUPPORTED;
}
@@ -101,8 +96,7 @@ static WERROR ResolveOxid2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_c
/*
ServerAlive2
*/
-static WERROR ServerAlive2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct ServerAlive2 *r)
+static WERROR ServerAlive2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ServerAlive2 *r)
{
return WERR_NOT_SUPPORTED;
}
diff --git a/source4/rpc_server/dcom/remact.c b/source4/rpc_server/dcom/remact.c
index 605422d750..8259b96a51 100644
--- a/source4/rpc_server/dcom/remact.c
+++ b/source4/rpc_server/dcom/remact.c
@@ -24,16 +24,40 @@
#include "rpc_server/dcerpc_server.h"
#include "rpc_server/common/common.h"
#include "librpc/gen_ndr/ndr_remact.h"
+#include "rpc_server/dcom/dcom.h"
+
+static void register_dcom_class(void *_c)
+{
+ struct dcom_class *class = _c;
+ /* FIXME */
+}
+
+struct dcom_object *dcom_object_by_oid(struct GUID *oid)
+{
+ /* FIXME */
+ return NULL;
+}
+
+struct dcom_class *dcom_class_by_clsid(struct GUID *clsid)
+{
+ /* FIXME */
+ return NULL;
+}
+
+struct dcom_interface_pointer *dcom_interface_pointer_by_ipid(struct GUID *ipid)
+{
+ /* FIXME */
+ return NULL;
+}
/*
RemoteActivation
*/
-static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct RemoteActivation *r)
+static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct RemoteActivation *r)
{
/* FIXME: CoGetClassObject() */
/* FIXME: IClassFactory::CreateInstance() */
- /* FIXME: IClassFactory::ReleaseInstance() */
+ /* FIXME: IClassFactory::Release() */
return WERR_NOT_SUPPORTED;
}
diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c
index ca67ac974e..7bb461bd6f 100644
--- a/source4/rpc_server/remote/dcesrv_remote.c
+++ b/source4/rpc_server/remote/dcesrv_remote.c
@@ -78,7 +78,7 @@ static NTSTATUS remote_op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CT
ndr_print_function_debug(ndr_print_fn, name, NDR_IN | NDR_SET_VALUES, r);
}
- status = dcerpc_ndr_request(private->c_pipe, opnum, mem_ctx,
+ status = dcerpc_ndr_request(private->c_pipe, NULL, opnum, mem_ctx,
(ndr_push_flags_fn_t) ndr_push_fn,
(ndr_pull_flags_fn_t) ndr_pull_fn,
r, struct_size);