svn commit: samba r3891 - in branches/SAMBA_4_0/source: lib/dcom/common librpc librpc/idl rpc_server torture torture/rpc utils

jelmer at samba.org jelmer at samba.org
Sat Nov 20 18:51:59 GMT 2004


Author: jelmer
Date: 2004-11-20 18:51:58 +0000 (Sat, 20 Nov 2004)
New Revision: 3891

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

Log:
Add rot (Running Object Table) interface

Added:
   branches/SAMBA_4_0/source/librpc/idl/rot.idl
   branches/SAMBA_4_0/source/torture/rpc/rot.c
Modified:
   branches/SAMBA_4_0/source/lib/dcom/common/rot.c
   branches/SAMBA_4_0/source/librpc/config.mk
   branches/SAMBA_4_0/source/rpc_server/config.mk
   branches/SAMBA_4_0/source/torture/config.mk
   branches/SAMBA_4_0/source/torture/torture.c
   branches/SAMBA_4_0/source/utils/ndrdump.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/dcom/common/rot.c
===================================================================
--- branches/SAMBA_4_0/source/lib/dcom/common/rot.c	2004-11-20 02:48:39 UTC (rev 3890)
+++ branches/SAMBA_4_0/source/lib/dcom/common/rot.c	2004-11-20 18:51:58 UTC (rev 3891)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 
+
 struct dcom_interface_p *dcom_get_iface_p(struct GUID *ipid)
 {
 	/* FIXME */

Modified: branches/SAMBA_4_0/source/librpc/config.mk
===================================================================
--- branches/SAMBA_4_0/source/librpc/config.mk	2004-11-20 02:48:39 UTC (rev 3890)
+++ branches/SAMBA_4_0/source/librpc/config.mk	2004-11-20 18:51:58 UTC (rev 3891)
@@ -72,6 +72,12 @@
 NOPROTO = YES
 REQUIRED_SUBSYSTEMS = LIBNDR
 
+[SUBSYSTEM::NDR_ROT]
+INIT_FUNCTION = dcerpc_rot_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_rot.o
+NOPROTO = YES
+REQUIRED_SUBSYSTEMS = LIBNDR
+
 [SUBSYSTEM::NDR_LSA]
 INIT_FUNCTION = dcerpc_lsa_init
 INIT_OBJ_FILES = librpc/gen_ndr/ndr_lsa.o
@@ -289,8 +295,13 @@
 	NDR_EVENTLOG NDR_EPMAPPER NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINS \
 	NDR_WINREG NDR_MGMT NDR_PROTECTED_STORAGE NDR_DCOM NDR_OXIDRESOLVER \
 	NDR_REMACT NDR_WZCSVC NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_NTSVCS \
-	NDR_NETLOGON NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC NDR_XATTR NDR_SCHANNEL
+	NDR_NETLOGON NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC NDR_XATTR NDR_SCHANNEL \
+	NDR_ROT
 
+[SUBSYSTEM::RPC_NDR_ROT]
+ADD_OBJ_FILES = librpc/gen_ndr/ndr_rot_c.o
+REQUIRED_SUBSYSTEMS = NDR_ROT LIBRPC
+NOPROTO = YES
 
 [SUBSYSTEM::RPC_NDR_AUDIOSRV]
 ADD_OBJ_FILES = librpc/gen_ndr/ndr_audiosrv_c.o

Added: branches/SAMBA_4_0/source/librpc/idl/rot.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/rot.idl	2004-11-20 02:48:39 UTC (rev 3890)
+++ branches/SAMBA_4_0/source/librpc/idl/rot.idl	2004-11-20 18:51:58 UTC (rev 3891)
@@ -0,0 +1,43 @@
+#include "idl_types.h"
+
+[
+	uuid("b9e79e60-3d52-11ce-aaa1-00006901293f"),
+	version(0.2),
+ 	endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 
+		  "ncalrpc:[EPMAPPER]", "ncacn_unix_stream:[/tmp/epmapper]")
+] interface rot
+{
+	WERROR rot_add (
+					[in] uint32 flags, 
+					[in] MInterfacePointer *unk, 
+					[in] MInterfacePointer *moniker, 
+					[out] uint32 rotid
+					);
+	
+	WERROR rot_remove (
+				  [in] uint32 rotid
+				  );
+	
+	WERROR rot_is_listed (
+					 [in] MInterfacePointer *moniker
+					 );
+	
+	WERROR rot_get_interface_pointer (
+					 [in] MInterfacePointer *moniker, 
+					 [out] MInterfacePointer *ip
+					 );
+	
+	WERROR rot_set_modification_time (
+						  [in] uint32 rotid, 
+						  [in] NTTIME *t
+						  );
+	
+	WERROR rot_get_modification_time (
+							   [in] MInterfacePointer *moniker,
+							   [out] NTTIME t
+							   );
+	
+	WERROR rot_enum (
+					   [out] MInterfacePointer *EnumMoniker
+					   );
+}

Modified: branches/SAMBA_4_0/source/rpc_server/config.mk
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/config.mk	2004-11-20 02:48:39 UTC (rev 3890)
+++ branches/SAMBA_4_0/source/rpc_server/config.mk	2004-11-20 18:51:58 UTC (rev 3891)
@@ -19,7 +19,8 @@
 INIT_OBJ_FILES = \
 		rpc_server/dcom/oxidresolver.o \
 		rpc_server/dcom/rot.o \
-		rpc_server/dcom/remact.o
+		rpc_server/dcom/remact.o \
+		librpc/gen_ndr/ndr_dcom_d.o
 REQUIRED_SUBSYSTEMS = \
 		DCERPC_COMMON \
 		NDR_OXIDRESOLVER \

Modified: branches/SAMBA_4_0/source/torture/config.mk
===================================================================
--- branches/SAMBA_4_0/source/torture/config.mk	2004-11-20 02:48:39 UTC (rev 3890)
+++ branches/SAMBA_4_0/source/torture/config.mk	2004-11-20 18:51:58 UTC (rev 3891)
@@ -95,13 +95,14 @@
 		torture/rpc/netlogon.o \
 		torture/rpc/samlogon.o \
 		torture/rpc/samsync.o \
+		torture/rpc/rot.o \
 		torture/rpc/bind.o
 REQUIRED_SUBSYSTEMS = \
 		NDR_ALL RPC_NDR_SAMR RPC_NDR_WINREG RPC_NDR_OXIDRESOLVER \
 		RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
 		RPC_NDR_MGMT RPC_NDR_NETLOGON RPC_NDR_ATSVC RPC_NDR_DRSUAPI \
 		RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_SPOOLSS \
-		RPC_NDR_SRVSVC RPC_NDR_WKSSVC
+		RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT
 # End SUBSYSTEM TORTURE_RPC
 #################################
 

Added: branches/SAMBA_4_0/source/torture/rpc/rot.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/rot.c	2004-11-20 02:48:39 UTC (rev 3890)
+++ branches/SAMBA_4_0/source/torture/rpc/rot.c	2004-11-20 18:51:58 UTC (rev 3891)
@@ -0,0 +1,46 @@
+/* 
+   Unix SMB/CIFS implementation.
+   test suite for the running object table
+
+   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 "librpc/gen_ndr/ndr_rot.h"
+
+BOOL torture_rpc_rot(void)
+{
+    NTSTATUS status;
+    struct dcerpc_pipe *p;
+	TALLOC_CTX *mem_ctx;
+	BOOL ret = True;
+
+	mem_ctx = talloc_init("torture_rpc_rot");
+
+	status = torture_rpc_connection(&p, 
+					DCERPC_ROT_NAME, 
+					DCERPC_ROT_UUID, 
+					DCERPC_ROT_VERSION);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return False;
+	}
+
+    torture_rpc_close(p);
+
+	return ret;
+}

Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c	2004-11-20 02:48:39 UTC (rev 3890)
+++ branches/SAMBA_4_0/source/torture/torture.c	2004-11-20 18:51:58 UTC (rev 3891)
@@ -2461,6 +2461,7 @@
 	{"RPC-MULTIBIND", torture_multi_bind, 0},
 	{"RPC-DRSUAPI", torture_rpc_drsuapi, 0},
 	{"RPC-LOGIN", torture_rpc_login, 0},
+	{"RPC-ROT", torture_rpc_rot, 0},
 
 	/* Distributed COM testers */
 	{"DCOM-SIMPLE", torture_dcom_simple, 0},

Modified: branches/SAMBA_4_0/source/utils/ndrdump.c
===================================================================
--- branches/SAMBA_4_0/source/utils/ndrdump.c	2004-11-20 02:48:39 UTC (rev 3890)
+++ branches/SAMBA_4_0/source/utils/ndrdump.c	2004-11-20 18:51:58 UTC (rev 3891)
@@ -116,6 +116,11 @@
 
 	p = idl_iface_by_name(pipe_name);
 
+	if (!p) {
+		printf("Unknown pipe '%s'\n", pipe_name);
+		exit(1);
+	}
+
 	function = poptGetArg(pc);
 	inout = poptGetArg(pc);
 	filename = poptGetArg(pc);



More information about the samba-cvs mailing list