[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1706-g153253e

Günther Deschner gd at samba.org
Tue Jan 29 14:52:03 GMT 2008


The branch, v3-2-test has been updated
       via  153253e14f82fc7078e9cc6f12409e6eda7ee7cb (commit)
      from  c420e42adfea9908a93d3eea5688488e5a9062a2 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 153253e14f82fc7078e9cc6f12409e6eda7ee7cb
Author: Günther Deschner <gd at samba.org>
Date:   Tue Jan 29 15:51:19 2008 +0100

    Remove unused rpc_ds marshalling code that is unused now.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/Makefile.in                |    2 +-
 source/include/rpc_ds.h           |   64 -------------
 source/rpc_parse/parse_ds.c       |  188 -------------------------------------
 source/rpc_server/srv_netlog.c    |   40 --------
 source/rpc_server/srv_netlog_nt.c |    2 +-
 5 files changed, 2 insertions(+), 294 deletions(-)
 delete mode 100644 source/rpc_parse/parse_ds.c


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index 3667dfe..73f5971 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -506,7 +506,7 @@ RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ)
 
 RPC_PARSE_OBJ = rpc_parse/parse_lsa.o $(RPC_PARSE_OBJ2) \
                 rpc_parse/parse_samr.o \
-                rpc_parse/parse_ds.o rpc_parse/parse_spoolss.o \
+                rpc_parse/parse_spoolss.o \
 	        rpc_parse/parse_eventlog.o rpc_parse/parse_buffer.o \
                 rpc_parse/parse_ntsvcs.o rpc_parse/parse_svcctl.o $(REGOBJS_OBJ)
 
diff --git a/source/include/rpc_ds.h b/source/include/rpc_ds.h
index b836689..70d63f1 100644
--- a/source/include/rpc_ds.h
+++ b/source/include/rpc_ds.h
@@ -20,48 +20,6 @@
 #ifndef _RPC_DS_H /* _RPC_LSA_H */
 #define _RPC_DS_H 
 
-/* Opcodes available on PIPE_NETLOGON */
-
-#define DS_ENUM_DOM_TRUSTS      0x28
-
-typedef struct {
-	/* static portion of structure */
-	uint32		netbios_ptr;
-	uint32		dns_ptr;
-	uint32		flags;
-	uint32		parent_index;
-	uint32		trust_type;
-	uint32		trust_attributes;
-	uint32		sid_ptr;
-	struct GUID	guid;
-	
-	UNISTR2		netbios_domain;
-	UNISTR2		dns_domain;
-	DOM_SID2	sid;
-
-} DS_DOMAIN_TRUSTS;
-
-struct ds_domain_trust {
-	/* static portion of structure */
-	uint32		flags;
-	uint32		parent_index;
-	uint32		trust_type;
-	uint32		trust_attributes;
-	struct GUID	guid;
-	
-	DOM_SID	sid;
-	char *netbios_domain;
-	char *dns_domain;
-};
-
-typedef struct {
-
-	uint32			ptr;
-	uint32			max_count;
-	DS_DOMAIN_TRUSTS 	*trusts;
-	
-} DS_DOMAIN_TRUSTS_CTR;
-
 /* Trust flags */
 
 #define DS_DOMAIN_IN_FOREST           0x0001 	/* domains in the forest to which 
@@ -87,26 +45,4 @@ typedef struct {
 #define DS_DOMAIN_TRUST_ATTRIB_IN_FOREST              0x00000020            
 #define DS_DOMAIN_TRUST_ATTRIB_EXTERNAL               0x00000040            
 
-
-
-/* DS_Q_ENUM_DOM_TRUSTS - DsEnumerateDomainTrusts() request */
-typedef struct 
-{
-	uint32		server_ptr;
-	UNISTR2		server;
-	uint32		flags;
-	
-} DS_Q_ENUM_DOM_TRUSTS;
-
-/* DS_R_ENUM_DOM_TRUSTS - DsEnumerateDomainTrusts() response */
-typedef struct 
-{
-	uint32			num_domains;
-	DS_DOMAIN_TRUSTS_CTR	domains;
-		
-	NTSTATUS status;
-
-} DS_R_ENUM_DOM_TRUSTS;
-
-
 #endif /* _RPC_DS_H */
diff --git a/source/rpc_parse/parse_ds.c b/source/rpc_parse/parse_ds.c
deleted file mode 100644
index 3cf4156..0000000
--- a/source/rpc_parse/parse_ds.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* 
- *  Unix SMB/CIFS implementation.
- *  RPC Pipe client / server routines
- 
- *  Copyright (C) Gerald Carter				2002-2003
- *  
- *  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 3 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, see <http://www.gnu.org/licenses/>.
- */
-
-#include "includes.h"
-
-/************************************************************************
- initialize a DS_ENUM_DOM_TRUSTS structure
-************************************************************************/
-
-bool init_q_ds_enum_domain_trusts( DS_Q_ENUM_DOM_TRUSTS *q, const char *server, uint32 flags )
-{
-	q->flags = flags;
-	
-	if ( server && *server )
-		q->server_ptr = 1;
-	else
-		q->server_ptr = 0;
-
-	init_unistr2( &q->server, server, UNI_STR_TERMINATE);
-		
-	return True;
-}
-
-/************************************************************************
-************************************************************************/
-
-static bool ds_io_domain_trusts( const char *desc, DS_DOMAIN_TRUSTS *trust, prs_struct *ps, int depth)
-{
-	prs_debug(ps, depth, desc, "ds_io_dom_trusts_ctr");
-	depth++;
-
-	if ( !prs_uint32( "netbios_ptr", ps, depth, &trust->netbios_ptr ) )
-		return False;
-	
-	if ( !prs_uint32( "dns_ptr", ps, depth, &trust->dns_ptr ) )
-		return False;
-	
-	if ( !prs_uint32( "flags", ps, depth, &trust->flags ) )
-		return False;
-	
-	if ( !prs_uint32( "parent_index", ps, depth, &trust->parent_index ) )
-		return False;
-	
-	if ( !prs_uint32( "trust_type", ps, depth, &trust->trust_type ) )
-		return False;
-	
-	if ( !prs_uint32( "trust_attributes", ps, depth, &trust->trust_attributes ) )
-		return False;
-	
-	if ( !prs_uint32( "sid_ptr", ps, depth, &trust->sid_ptr ) )
-		return False;
-	
-	if ( !smb_io_uuid("guid", &trust->guid, ps, depth) )
-		return False;
-	
-	return True;	
-}
-
-/************************************************************************
-************************************************************************/
-
-static bool ds_io_dom_trusts_ctr( const char *desc, DS_DOMAIN_TRUSTS_CTR *ctr, prs_struct *ps, int depth)
-{
-	int i;
-
-	prs_debug(ps, depth, desc, "ds_io_dom_trusts_ctr");
-	depth++;
-	
-	if ( !prs_uint32( "ptr", ps, depth, &ctr->ptr ) )
-		return False;
-	
-	if ( !prs_uint32( "max_count", ps, depth, &ctr->max_count ) )
-		return False;
-	
-	/* are we done? */
-	
-	if ( ctr->max_count == 0 )
-		return True;
-	
-	/* allocate the domain trusts array are parse it */
-	
-	ctr->trusts = TALLOC_ARRAY(ps->mem_ctx, DS_DOMAIN_TRUSTS, ctr->max_count);
-	
-	if ( !ctr->trusts )
-		return False;
-	
-	/* this stinks; the static portion o fthe structure is read here and then
-	   we need another loop to read the UNISTR2's and SID's */
-	   
-	for ( i=0; i<ctr->max_count;i++ ) {
-		if ( !ds_io_domain_trusts("domain_trusts", &ctr->trusts[i], ps, depth) )
-			return False;
-	}
-
-	for ( i=0; i<ctr->max_count; i++ ) {
-	
-		if ( !smb_io_unistr2("netbios_domain", &ctr->trusts[i].netbios_domain, ctr->trusts[i].netbios_ptr, ps, depth) )
-			return False;
-
-		if(!prs_align(ps))
-			return False;
-		
-		if ( !smb_io_unistr2("dns_domain", &ctr->trusts[i].dns_domain, ctr->trusts[i].dns_ptr, ps, depth) )
-			return False;
-
-		if(!prs_align(ps))
-			return False;
-			
-		if ( ctr->trusts[i].sid_ptr ) {
-			if ( !smb_io_dom_sid2("sid", &ctr->trusts[i].sid, ps, depth ) )
-				return False;		
-		}
-	}
-	
-	return True;
-}
-
-/************************************************************************
- initialize a DS_ENUM_DOM_TRUSTS request
-************************************************************************/
-
-bool ds_io_q_enum_domain_trusts( const char *desc, DS_Q_ENUM_DOM_TRUSTS *q_u, prs_struct *ps, int depth)
-{
-	prs_debug(ps, depth, desc, "ds_io_q_enum_domain_trusts");
-	depth++;
-
-	if ( !prs_align(ps) )
-		return False;
-	
-	if ( !prs_uint32( "server_ptr", ps, depth, &q_u->server_ptr ) )
-		return False;
-	
-	if ( !smb_io_unistr2("server", &q_u->server, q_u->server_ptr, ps, depth) )
-			return False;
-	
-	if ( !prs_align(ps) )
-		return False;
-	
-	if ( !prs_uint32( "flags", ps, depth, &q_u->flags ) )
-		return False;
-	
-	return True;
-}
-
-/************************************************************************
-************************************************************************/
-
-bool ds_io_r_enum_domain_trusts( const char *desc, DS_R_ENUM_DOM_TRUSTS *r_u, prs_struct *ps, int depth)
-{
-	prs_debug(ps, depth, desc, "ds_io_r_enum_domain_trusts");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if ( !prs_uint32( "num_domains", ps, depth, &r_u->num_domains ) )
-		return False;
-		
-	if ( r_u->num_domains ) {
-		if ( !ds_io_dom_trusts_ctr("domains", &r_u->domains, ps, depth) )
-			return False;
-	}
-		
-	if(!prs_align(ps))
-		return False;
-			
-	if ( !prs_ntstatus("status", ps, depth, &r_u->status ) )
-		return False;		
-		
-	return True;
-}
diff --git a/source/rpc_server/srv_netlog.c b/source/rpc_server/srv_netlog.c
index 6d9859a..30ef02b 100644
--- a/source/rpc_server/srv_netlog.c
+++ b/source/rpc_server/srv_netlog.c
@@ -335,43 +335,6 @@ static bool api_net_sam_logon_ex(pipes_struct *p)
 	return True;
 }
 
-
-/*************************************************************************
- api_ds_enum_dom_trusts:
- *************************************************************************/
-
-#if 0 	/* JERRY */
-static bool api_ds_enum_dom_trusts(pipes_struct *p)
-{
-	DS_Q_ENUM_DOM_TRUSTS q_u;
-	DS_R_ENUM_DOM_TRUSTS r_u;
-
-	prs_struct *data = &p->in_data.data;
-	prs_struct *rdata = &p->out_data.rdata;
-
-	ZERO_STRUCT(q_u);
-	ZERO_STRUCT(r_u);
-
-	DEBUG(6,("api_ds_enum_dom_trusts\n"));
-
-	if ( !ds_io_q_enum_domain_trusts("", data, 0, &q_u) ) {
-		DEBUG(0,("api_ds_enum_domain_trusts: Failed to unmarshall DS_Q_ENUM_DOM_TRUSTS.\n"));
-		return False;
-	}
-
-	r_u.status = _ds_enum_dom_trusts(p, &q_u, &r_u);
-
-	if ( !ds_io_r_enum_domain_trusts("", rdata, 0, &r_u) ) {
-		DEBUG(0,("api_ds_enum_domain_trusts: Failed to marshall DS_R_ENUM_DOM_TRUSTS.\n"));
-		return False;
-	}
-
-	DEBUG(6,("api_ds_enum_dom_trusts\n"));
-
-	return True;
-}
-#endif	/* JERRY */
-
 /*******************************************************************
  array of \PIPE\NETLOGON operations
  ********************************************************************/
@@ -387,9 +350,6 @@ static struct api_struct api_net_cmds [] =
       { "NET_TRUST_DOM_LIST", NET_TRUST_DOM_LIST, api_net_trust_dom_list },
       { "NET_LOGON_CTRL"    , NET_LOGON_CTRL    , api_net_logon_ctrl     },
       { "NET_SAMLOGON_EX"   , NET_SAMLOGON_EX   , api_net_sam_logon_ex   },
-#if 0	/* JERRY */
-      { "DS_ENUM_DOM_TRUSTS", DS_ENUM_DOM_TRUSTS, api_ds_enum_dom_trusts }
-#endif	/* JERRY */
     };
 
 void netlog_get_pipe_fns( struct api_struct **fns, int *n_fns )
diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c
index 904ee17..5003af8 100644
--- a/source/rpc_server/srv_netlog_nt.c
+++ b/source/rpc_server/srv_netlog_nt.c
@@ -1130,7 +1130,7 @@ NTSTATUS _net_sam_logon_ex(pipes_struct *p, NET_Q_SAM_LOGON_EX *q_u, NET_R_SAM_L
  _ds_enum_dom_trusts
  *************************************************************************/
 #if 0	/* JERRY -- not correct */
-NTSTATUS _ds_enum_dom_trusts(pipes_struct *p, DS_Q_ENUM_DOM_TRUSTS *q_u,
+ NTSTATUS _ds_enum_dom_trusts(pipes_struct *p, DS_Q_ENUM_DOM_TRUSTS *q_u,
 			     DS_R_ENUM_DOM_TRUSTS *r_u)
 {
 	NTSTATUS status = NT_STATUS_OK;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list