summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-02 14:52:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:21 -0500
commit5f6ec5270df147f1bd534a25f86866831aa816e8 (patch)
treeffc493c26fcedd299ec69f6a27a2d3678ebd03a9 /source4/rpc_server
parenta2fd2488c79902dfe1de764bea4f619ec6107fed (diff)
downloadsamba-5f6ec5270df147f1bd534a25f86866831aa816e8.tar.gz
samba-5f6ec5270df147f1bd534a25f86866831aa816e8.tar.bz2
samba-5f6ec5270df147f1bd534a25f86866831aa816e8.zip
r3486: Add RemoteActivation server
(This used to be commit 0987a5fdd6425a85823f57fe5b596bb6c404bce8)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/config.m41
-rw-r--r--source4/rpc_server/config.mk10
-rw-r--r--source4/rpc_server/dcom/oxidresolver.c30
-rw-r--r--source4/rpc_server/dcom/remact.c42
4 files changed, 81 insertions, 2 deletions
diff --git a/source4/rpc_server/config.m4 b/source4/rpc_server/config.m4
index 609bd28fc2..52559aa12f 100644
--- a/source4/rpc_server/config.m4
+++ b/source4/rpc_server/config.m4
@@ -16,6 +16,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_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 4e08181ab0..784665c80b 100644
--- a/source4/rpc_server/config.mk
+++ b/source4/rpc_server/config.mk
@@ -21,6 +21,16 @@ REQUIRED_SUBSYSTEMS = \
# 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
+################################################
+
################################################
diff --git a/source4/rpc_server/dcom/oxidresolver.c b/source4/rpc_server/dcom/oxidresolver.c
index 2ccf136cad..76fa6a760e 100644
--- a/source4/rpc_server/dcom/oxidresolver.c
+++ b/source4/rpc_server/dcom/oxidresolver.c
@@ -24,6 +24,24 @@
#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 @@ static WERROR SimplePing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx
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 ComplexPing(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ct
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 @@ static WERROR ServerAlive2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_c
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"
diff --git a/source4/rpc_server/dcom/remact.c b/source4/rpc_server/dcom/remact.c
new file mode 100644
index 0000000000..605422d750
--- /dev/null
+++ b/source4/rpc_server/dcom/remact.c
@@ -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"