summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/remact.idl4
-rw-r--r--source4/rpc_server/config.m43
-rw-r--r--source4/rpc_server/config.mk19
-rw-r--r--source4/rpc_server/dcom/oxidresolver.c17
-rw-r--r--source4/rpc_server/dcom/remact.c47
-rw-r--r--source4/rpc_server/dcom/rot.c46
6 files changed, 95 insertions, 41 deletions
diff --git a/source4/librpc/idl/remact.idl b/source4/librpc/idl/remact.idl
index 6065d41bcc..d73f6c5125 100644
--- a/source4/librpc/idl/remact.idl
+++ b/source4/librpc/idl/remact.idl
@@ -5,8 +5,6 @@
http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm
*/
-#define IPID GUID
-
[
uuid("4d9f4ab8-7d1c-11cf-861e-0020af6e7c57"),
pointer_default(unique),
@@ -43,7 +41,7 @@ interface IRemoteActivation
[in, size_is(num_protseqs)] uint16 protseq[],
[out] HYPER_T pOxid,
[out] DUALSTRINGARRAY *pdsaOxidBindings,
- [out] IPID ipidRemUnknown,
+ [out] GUID ipidRemUnknown,
[out] uint32 AuthnHint,
[out] COMVERSION ServerVersion,
[out] WERROR hr,
diff --git a/source4/rpc_server/config.m4 b/source4/rpc_server/config.m4
index 52559aa12f..7fb8b555c2 100644
--- a/source4/rpc_server/config.m4
+++ b/source4/rpc_server/config.m4
@@ -15,8 +15,7 @@ SMB_MODULE_MK(dcerpc_winreg,DCERPC,STATIC,rpc_server/config.mk)
SMB_MODULE_MK(dcerpc_netlogon,DCERPC,STATIC,rpc_server/config.mk)
SMB_MODULE_MK(dcerpc_lsarpc,DCERPC,STATIC,rpc_server/config.mk)
SMB_MODULE_MK(dcerpc_spoolss,DCERPC,STATIC,rpc_server/config.mk)
-SMB_MODULE_MK(dcerpc_IOXIDResolver,DCERPC,STATIC,rpc_server/config.mk)
-SMB_MODULE_MK(dcerpc_IRemoteActivation,DCERPC,STATIC,rpc_server/config.mk)
+SMB_MODULE_MK(dcerpc_dcom,DCERPC,STATIC,rpc_server/config.mk)
SMB_MODULE_MK(dcerpc_drsuapi,DCERPC,STATIC,rpc_server/config.mk)
SMB_SUBSYSTEM_MK(DCERPC,rpc_server/config.mk)
diff --git a/source4/rpc_server/config.mk b/source4/rpc_server/config.mk
index a513377077..4b89e875cf 100644
--- a/source4/rpc_server/config.mk
+++ b/source4/rpc_server/config.mk
@@ -12,21 +12,12 @@ ADD_OBJ_FILES = \
################################################
################################################
-# Start MODULE dcerpc_IOXIDResolver
-[MODULE::dcerpc_IOXIDResolver]
-INIT_FUNCTION = dcerpc_server_IOXIDResolver_init
-INIT_OBJ_FILES = \
- rpc_server/dcom/oxidresolver.o
-REQUIRED_SUBSYSTEMS = \
- DCERPC_COMMON
-# End MODULE dcerpc_IOXIDResolver
-################################################
-
-################################################
-# Start MODULE dcerpc_IRemoteActivation
-[MODULE::dcerpc_IRemoteActivation]
-INIT_FUNCTION = dcerpc_server_IRemoteActivation_init
+# Start MODULE dcerpc_DCOM
+[MODULE::dcerpc_dcom]
+INIT_FUNCTION = dcerpc_server_dcom_init
INIT_OBJ_FILES = \
+ rpc_server/dcom/oxidresolver.o \
+ rpc_server/dcom/rot.o \
rpc_server/dcom/remact.o
REQUIRED_SUBSYSTEMS = \
DCERPC_COMMON
diff --git a/source4/rpc_server/dcom/oxidresolver.c b/source4/rpc_server/dcom/oxidresolver.c
index 213802fade..a3f65b62e5 100644
--- a/source4/rpc_server/dcom/oxidresolver.c
+++ b/source4/rpc_server/dcom/oxidresolver.c
@@ -89,21 +89,30 @@ static WERROR ServerAlive(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ct
*/
static WERROR ResolveOxid2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ResolveOxid2 *r)
{
+ ZERO_STRUCT(r->out);
+ r->out.ComVersion.MajorVersion = COM_MAJOR_VERSION;
+ r->out.ComVersion.MinorVersion = COM_MINOR_VERSION;
return WERR_NOT_SUPPORTED;
}
+struct DUALSTRINGARRAY *dcom_server_generate_dual_string(TALLOC_CTX *mem_ctx, struct dcesrv_call_state *state)
+{
+ return NULL; /* FIXME */
+}
/*
ServerAlive2
*/
static WERROR ServerAlive2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ServerAlive2 *r)
{
- return WERR_NOT_SUPPORTED;
+ ZERO_STRUCT(r->out);
+ r->out.info.version.MajorVersion = COM_MAJOR_VERSION;
+ r->out.info.version.MinorVersion = COM_MINOR_VERSION;
+ r->out.dualstring = *dcom_server_generate_dual_string(mem_ctx, dce_call);
+ return WERR_OK;
}
-/* FIXME: Regularly ping objects in use by local programs on
- * remote servers */
-
+/* FIXME: Garbage collect objects that haven't been pinged */
/* include the generated boilerplate */
#include "librpc/gen_ndr/ndr_oxidresolver_s.c"
diff --git a/source4/rpc_server/dcom/remact.c b/source4/rpc_server/dcom/remact.c
index 8259b96a51..086d32a82f 100644
--- a/source4/rpc_server/dcom/remact.c
+++ b/source4/rpc_server/dcom/remact.c
@@ -24,26 +24,9 @@
#include "rpc_server/dcerpc_server.h"
#include "rpc_server/common/common.h"
#include "librpc/gen_ndr/ndr_remact.h"
+#include "librpc/gen_ndr/ndr_oxidresolver.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 */
@@ -57,10 +40,38 @@ static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
{
/* FIXME: CoGetClassObject() */
/* FIXME: IClassFactory::CreateInstance() */
+ /* FIXME: Register newly created object with dcerpc subsystem */
/* FIXME: IClassFactory::Release() */
+
+ ZERO_STRUCT(r->out);
+ r->out.ServerVersion.MajorVersion = COM_MAJOR_VERSION;
+ r->out.ServerVersion.MinorVersion = COM_MINOR_VERSION;
+
+ /* FIXME: */
+ r->out.hr = WERR_NOT_SUPPORTED;
+ r->out.pOxid = 0;
+ r->out.AuthnHint = 0;
+ /* FIXME: Loop thru given interfaces and set r->out.results and
+ * r->out.interfaces */
+
return WERR_NOT_SUPPORTED;
}
+NTSTATUS dcerpc_server_dcom_init(void)
+{
+ NTSTATUS status;
+ status = dcerpc_server_IOXIDResolver_init();
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ status = dcerpc_server_IRemoteActivation_init();
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ return NT_STATUS_OK;
+}
/* include the generated boilerplate */
#include "librpc/gen_ndr/ndr_remact_s.c"
diff --git a/source4/rpc_server/dcom/rot.c b/source4/rpc_server/dcom/rot.c
new file mode 100644
index 0000000000..f55ff59af4
--- /dev/null
+++ b/source4/rpc_server/dcom/rot.c
@@ -0,0 +1,46 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Running object table functions
+
+ 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.
+*/
+
+#include "includes.h"
+#include "rpc_server/dcerpc_server.h"
+#include "rpc_server/common/common.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;
+}
+