svn commit: samba r3486 - in branches/SAMBA_4_0/source/rpc_server: . dcom

jelmer at samba.org jelmer at samba.org
Tue Nov 2 14:52:46 GMT 2004


Author: jelmer
Date: 2004-11-02 14:52:45 +0000 (Tue, 02 Nov 2004)
New Revision: 3486

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

Log:
Add RemoteActivation server

Added:
   branches/SAMBA_4_0/source/rpc_server/dcom/remact.c
Modified:
   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


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/config.m4
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/config.m4	2004-11-02 13:59:14 UTC (rev 3485)
+++ branches/SAMBA_4_0/source/rpc_server/config.m4	2004-11-02 14:52:45 UTC (rev 3486)
@@ -16,6 +16,7 @@
 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_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-02 13:59:14 UTC (rev 3485)
+++ branches/SAMBA_4_0/source/rpc_server/config.mk	2004-11-02 14:52:45 UTC (rev 3486)
@@ -21,8 +21,18 @@
 # End MODULE dcerpc_IOXIDResolver
 ################################################
 
+################################################
+# Start MODULE dcerpc_IRemoteActivation
+[MODULE::dcerpc_IRemoteActivation]
+INIT_OBJ_FILES = \
+		rpc_server/dcom/remact.o
+REQUIRED_SUBSYSTEMS = \
+		DCERPC_COMMON
+# End MODULE dcerpc_IRemoteActivation
+################################################
 
 
+
 ################################################
 # Start SUBSYSTEM SAMDB
 [SUBSYSTEM::SAMDB]

Modified: branches/SAMBA_4_0/source/rpc_server/dcom/oxidresolver.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcom/oxidresolver.c	2004-11-02 13:59:14 UTC (rev 3485)
+++ branches/SAMBA_4_0/source/rpc_server/dcom/oxidresolver.c	2004-11-02 14:52:45 UTC (rev 3486)
@@ -24,7 +24,25 @@
 #include "librpc/gen_ndr/ndr_oxidresolver.h"
 #include "rpc_server/dcerpc_server.h"
 
+struct OXIDObject
+{
+	struct GUID OID;
+};
 
+struct PingSet
+{
+	HYPER_T id;
+	struct OXIDObject *objects;
+	struct PingSet *prev, *next;
+};
+
+/* Maximum number of missed ping calls before a client is presumed 
+ * gone */
+#define MAX_MISSED_PINGS		3
+
+/* Maximum number of seconds between two ping calls */
+#define MAX_PING_TIME		   60
+
 /* 
   ResolveOxid 
 */
@@ -44,13 +62,18 @@
 	return WERR_NOT_SUPPORTED;
 }
 
-
 /* 
   ComplexPing 
 */
 static WERROR ComplexPing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
 		       struct ComplexPing *r)
 {
+	struct PingSet *ps;
+	
+	/* If r->in.SetId == 0, create new PingSet */
+	
+	/* Otherwise, look up pingset by id */
+	
 	return WERR_NOT_SUPPORTED;
 }
 
@@ -61,7 +84,7 @@
 static WERROR ServerAlive(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
 		       struct ServerAlive *r)
 {
-	return WERR_NOT_SUPPORTED;
+	return WERR_OK;
 }
 
 
@@ -84,6 +107,9 @@
 	return WERR_NOT_SUPPORTED;
 }
 
+/* FIXME: Regularly ping objects in use by local programs on 
+ * remote servers */
 
+
 /* include the generated boilerplate */
 #include "librpc/gen_ndr/ndr_oxidresolver_s.c"

Added: branches/SAMBA_4_0/source/rpc_server/dcom/remact.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/dcom/remact.c	2004-11-02 13:59:14 UTC (rev 3485)
+++ branches/SAMBA_4_0/source/rpc_server/dcom/remact.c	2004-11-02 14:52:45 UTC (rev 3486)
@@ -0,0 +1,42 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   endpoint server for the IRemoteActivation pipe
+
+   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 "librpc/gen_ndr/ndr_remact.h"
+
+/* 
+  RemoteActivation 
+*/
+static WERROR RemoteActivation(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+		       struct RemoteActivation *r)
+{
+	/* FIXME: CoGetClassObject() */
+	/* FIXME: IClassFactory::CreateInstance() */
+	/* FIXME: IClassFactory::ReleaseInstance() */
+	return WERR_NOT_SUPPORTED;
+}
+
+
+/* include the generated boilerplate */
+#include "librpc/gen_ndr/ndr_remact_s.c"



More information about the samba-cvs mailing list