svn commit: samba r3629 - in branches/SAMBA_4_0/source: librpc/idl rpc_server rpc_server/dcom

jelmer at samba.org jelmer at samba.org
Tue Nov 9 00:30:44 GMT 2004


Author: jelmer
Date: 2004-11-09 00:30:44 +0000 (Tue, 09 Nov 2004)
New Revision: 3629

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3629

Log:
A bit of work on the DCOM server architecture, small fixes

Added:
   branches/SAMBA_4_0/source/rpc_server/dcom/rot.c
Modified:
   branches/SAMBA_4_0/source/librpc/idl/remact.idl
   branches/SAMBA_4_0/source/rpc_server/config.m4
   branches/SAMBA_4_0/source/rpc_server/config.mk
   branches/SAMBA_4_0/source/rpc_server/dcom/oxidresolver.c
   branches/SAMBA_4_0/source/rpc_server/dcom/remact.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/remact.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/remact.idl	2004-11-08 23:34:28 UTC (rev 3628)
+++ branches/SAMBA_4_0/source/librpc/idl/remact.idl	2004-11-09 00:30:44 UTC (rev 3629)
@@ -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 @@
 			[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,

Modified: branches/SAMBA_4_0/source/rpc_server/config.m4
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/config.m4	2004-11-08 23:34:28 UTC (rev 3628)
+++ branches/SAMBA_4_0/source/rpc_server/config.m4	2004-11-09 00:30:44 UTC (rev 3629)
@@ -15,8 +15,7 @@
 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)

Modified: branches/SAMBA_4_0/source/rpc_server/config.mk
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/config.mk	2004-11-08 23:34:28 UTC (rev 3628)
+++ branches/SAMBA_4_0/source/rpc_server/config.mk	2004-11-09 00:30:44 UTC (rev 3629)
@@ -12,21 +12,12 @@
 ################################################
 
 ################################################
-# Start MODULE dcerpc_IOXIDResolver
-[MODULE::dcerpc_IOXIDResolver]
-INIT_FUNCTION = dcerpc_server_IOXIDResolver_init
+# Start MODULE dcerpc_DCOM
+[MODULE::dcerpc_dcom]
+INIT_FUNCTION = dcerpc_server_dcom_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
-INIT_OBJ_FILES = \
+		rpc_server/dcom/oxidresolver.o \
+		rpc_server/dcom/rot.o \
 		rpc_server/dcom/remact.o
 REQUIRED_SUBSYSTEMS = \
 		DCERPC_COMMON

Modified: branches/SAMBA_4_0/source/rpc_server/dcom/oxidresolver.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcom/oxidresolver.c	2004-11-08 23:34:28 UTC (rev 3628)
+++ branches/SAMBA_4_0/source/rpc_server/dcom/oxidresolver.c	2004-11-09 00:30:44 UTC (rev 3629)
@@ -89,21 +89,30 @@
 */
 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"

Modified: branches/SAMBA_4_0/source/rpc_server/dcom/remact.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcom/remact.c	2004-11-08 23:34:28 UTC (rev 3628)
+++ branches/SAMBA_4_0/source/rpc_server/dcom/remact.c	2004-11-09 00:30:44 UTC (rev 3629)
@@ -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 @@
 {
 	/* 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"

Added: branches/SAMBA_4_0/source/rpc_server/dcom/rot.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcom/rot.c	2004-11-08 23:34:28 UTC (rev 3628)
+++ branches/SAMBA_4_0/source/rpc_server/dcom/rot.c	2004-11-09 00:30:44 UTC (rev 3629)
@@ -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;
+}
+



More information about the samba-cvs mailing list