[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1901-g2e2b80b

Günther Deschner gd at samba.org
Tue Feb 5 12:21:18 GMT 2008


The branch, v3-2-test has been updated
       via  2e2b80bd03133dcf7a9c8a54f60eba7d07b7038a (commit)
       via  91c48ae15bea2235f8170170c2964bb1bae016ac (commit)
       via  ab344dea9689ffc191110de0eca0d43b7221f7ee (commit)
       via  fc55433aeecac40af780d61b23c0b80c38190cab (commit)
       via  48e74f77529ca8d75d99b1f415b9417ff0cf0679 (commit)
       via  1793ed10df7f403b85a4e52c67cbfb277b23b30b (commit)
      from  5a9cb4cda9ac71ca8b01d21201bf2348e7f3f24f (commit)

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


- Log -----------------------------------------------------------------
commit 2e2b80bd03133dcf7a9c8a54f60eba7d07b7038a
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 5 11:23:04 2008 +0100

    Remove unused marshalling for SAMR_REMOVE_SID_FOREIGN_DOMAIN.
    
    Guenther

commit 91c48ae15bea2235f8170170c2964bb1bae016ac
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 5 11:21:07 2008 +0100

    Use rpccli_samr_RemoveMemberFromForeignDomain() in net.
    
    Guenther

commit ab344dea9689ffc191110de0eca0d43b7221f7ee
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 5 11:16:58 2008 +0100

    Use pidl for _samr_RemoveMemberFromForeignDomain().
    
    Guenther

commit fc55433aeecac40af780d61b23c0b80c38190cab
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 5 11:17:45 2008 +0100

    Remove unused marshalling for SAMR_QUERY_USERALIASES.
    
    Guenther

commit 48e74f77529ca8d75d99b1f415b9417ff0cf0679
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 5 11:00:56 2008 +0100

    Remove unused marshalling for SAMR_QUERY_GROUPMEM.
    
    Guenther

commit 1793ed10df7f403b85a4e52c67cbfb277b23b30b
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 5 10:58:37 2008 +0100

    Use rpccli_samr_QueryGroupMember() all over the place.
    
    Guenther

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

Summary of changes:
 source/include/rpc_samr.h       |   83 ---------
 source/rpc_client/cli_samr.c    |  126 -------------
 source/rpc_parse/parse_samr.c   |  374 ---------------------------------------
 source/rpc_server/srv_samr.c    |   23 +---
 source/rpc_server/srv_samr_nt.c |   29 +--
 source/rpcclient/cmd_samr.c     |   17 +-
 source/utils/net_rpc.c          |   51 +++---
 source/winbindd/winbindd_rpc.c  |   10 +-
 8 files changed, 55 insertions(+), 658 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h
index affd1f2..4ee2dae 100644
--- a/source/include/rpc_samr.h
+++ b/source/include/rpc_samr.h
@@ -1216,42 +1216,6 @@ typedef struct r_samr_query_user_info
 
 
 /****************************************************************************
-SAMR_Q_QUERY_USERALIASES - do a conversion from name to RID.
-
-the policy handle allocated by an "samr open secret" call is associated
-with a SID.  this policy handle is what is queried here, *not* the SID
-itself.  the response to the lookup rids is relative to this SID.
-*****************************************************************************/
-/* SAMR_Q_QUERY_USERALIASES */
-typedef struct q_samr_query_useraliases_info
-{
-	POLICY_HND pol;       /* policy handle */
-
-	uint32 num_sids1;      /* number of rids being looked up */
-	uint32 ptr;            /* buffer pointer */
-	uint32 num_sids2;      /* number of rids being looked up */
-
-	uint32   *ptr_sid; /* pointers to sids to be looked up */
-	DOM_SID2 *sid    ; /* sids to be looked up. */
-
-} SAMR_Q_QUERY_USERALIASES;
-
-
-/* SAMR_R_QUERY_USERALIASES */
-typedef struct r_samr_query_useraliases_info
-{
-	uint32 num_entries;
-	uint32 ptr; /* undocumented buffer pointer */
-
-	uint32 num_entries2; 
-	uint32 *rid; /* domain RIDs being looked up */
-
-	NTSTATUS status; /* return code */
-
-} SAMR_R_QUERY_USERALIASES;
-
-
-/****************************************************************************
 SAMR_Q_LOOKUP_NAMES - do a conversion from Names to RIDs+types.
 *****************************************************************************/
 /* SAMR_Q_LOOKUP_NAMES */
@@ -1335,34 +1299,6 @@ typedef struct r_samr_lookup_rids_info
 } SAMR_R_LOOKUP_RIDS;
 
 
-/* SAMR_Q_QUERY_GROUPMEM - query group members */
-typedef struct q_samr_query_groupmem_info
-{
-	POLICY_HND group_pol;        /* policy handle */
-
-} SAMR_Q_QUERY_GROUPMEM;
-
-
-/* SAMR_R_QUERY_GROUPMEM - query group members */
-typedef struct r_samr_query_groupmem_info
-{
-	uint32 ptr;
-	uint32 num_entries;
-
-	uint32 ptr_rids;
-	uint32 ptr_attrs;
-
-	uint32 num_rids;
-	uint32 *rid;
-
-	uint32 num_attrs;
-	uint32 *attr;
-
-	NTSTATUS status;
-
-} SAMR_R_QUERY_GROUPMEM;
-
-
 /* SAMR_ENC_PASSWD */
 typedef struct enc_passwd_info
 {
@@ -1451,25 +1387,6 @@ typedef struct r_samr_chgpasswd_user3
 } SAMR_R_CHGPASSWD_USER3;
 
 
-
-/* SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN */
-typedef struct q_samr_remove_sid_foreign_domain_info
-{
-	POLICY_HND dom_pol;   /* policy handle */
-	DOM_SID2 sid;         /* SID */
-
-} SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN;
-
-
-/* SAMR_R_REMOVE_SID_FOREIGN_DOMAIN */
-typedef struct r_samr_remove_sid_foreign_domain_info
-{
-	NTSTATUS status;         /* return status */
-
-} SAMR_R_REMOVE_SID_FOREIGN_DOMAIN;
-
-
-
 /* these are from the old rpc_samr.h - they are needed while the merge
    is still going on */
 #define MAX_SAM_SIDS 15
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c
index b0078c3..21e44e0 100644
--- a/source/rpc_client/cli_samr.c
+++ b/source/rpc_client/cli_samr.c
@@ -200,97 +200,6 @@ NTSTATUS rpccli_samr_set_aliasinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
 	return result;
 }
 
-/* Query user aliases */
-
-NTSTATUS rpccli_samr_query_useraliases(struct rpc_pipe_client *cli,
-				       TALLOC_CTX *mem_ctx, 
-				       POLICY_HND *dom_pol, uint32 num_sids,
-				       DOM_SID2 *sid,
-				       uint32 *num_aliases, uint32 **als_rids)
-{
-	prs_struct qbuf, rbuf;
-	SAMR_Q_QUERY_USERALIASES q;
-	SAMR_R_QUERY_USERALIASES r;
-	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-	int i;
-	uint32 *sid_ptrs;
-	
-	DEBUG(10,("cli_samr_query_useraliases\n"));
-
-	ZERO_STRUCT(q);
-	ZERO_STRUCT(r);
-
-	if (num_sids) {
-		sid_ptrs = TALLOC_ARRAY(mem_ctx, uint32, num_sids);
-		if (sid_ptrs == NULL)
-			return NT_STATUS_NO_MEMORY;
-	} else {
-		sid_ptrs = NULL;
-	}
-	
-	for (i=0; i<num_sids; i++)
-		sid_ptrs[i] = 1;
-
-	/* Marshall data and send request */
-
-	init_samr_q_query_useraliases(&q, dom_pol, num_sids, sid_ptrs, sid);
-
-	CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_USERALIASES,
-		q, r,
-		qbuf, rbuf,
-		samr_io_q_query_useraliases,
-		samr_io_r_query_useraliases,
-		NT_STATUS_UNSUCCESSFUL); 
-
-	/* Return output parameters */
-
-	if (NT_STATUS_IS_OK(result = r.status)) {
-		*num_aliases = r.num_entries;
-		*als_rids = r.rid;
-	}
-
-	return result;
-}
-
-/* Query user groups */
-
-NTSTATUS rpccli_samr_query_groupmem(struct rpc_pipe_client *cli,
-				    TALLOC_CTX *mem_ctx,
-				    POLICY_HND *group_pol, uint32 *num_mem, 
-				    uint32 **rid, uint32 **attr)
-{
-	prs_struct qbuf, rbuf;
-	SAMR_Q_QUERY_GROUPMEM q;
-	SAMR_R_QUERY_GROUPMEM r;
-	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-	DEBUG(10,("cli_samr_query_groupmem\n"));
-
-	ZERO_STRUCT(q);
-	ZERO_STRUCT(r);
-
-	/* Marshall data and send request */
-
-	init_samr_q_query_groupmem(&q, group_pol);
-
-	CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_GROUPMEM,
-		q, r,
-		qbuf, rbuf,
-		samr_io_q_query_groupmem,
-		samr_io_r_query_groupmem,
-		NT_STATUS_UNSUCCESSFUL); 
-
-	/* Return output parameters */
-
-	if (NT_STATUS_IS_OK(result = r.status)) {
-		*num_mem = r.num_entries;
-		*rid = r.rid;
-		*attr = r.attr;
-	}
-
-	return result;
-}
-
 /**
  * Enumerate domain users
  *
@@ -1204,38 +1113,3 @@ NTSTATUS rpccli_samr_set_userinfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
 
 	return result;
 }
-
-/* Remove foreign SID */
-
-NTSTATUS rpccli_samr_remove_sid_foreign_domain(struct rpc_pipe_client *cli, 
-					    TALLOC_CTX *mem_ctx, 
-					    POLICY_HND *user_pol,
-					    DOM_SID *sid)
-{
-	prs_struct qbuf, rbuf;
-	SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN q;
-	SAMR_R_REMOVE_SID_FOREIGN_DOMAIN r;
-	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-	DEBUG(10,("cli_samr_remove_sid_foreign_domain\n"));
-
-	ZERO_STRUCT(q);
-	ZERO_STRUCT(r);
-
-	/* Marshall data and send request */
-
-	init_samr_q_remove_sid_foreign_domain(&q, user_pol, sid);
-
-	CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_REMOVE_SID_FOREIGN_DOMAIN,
-		q, r,
-		qbuf, rbuf,
-		samr_io_q_remove_sid_foreign_domain,
-		samr_io_r_remove_sid_foreign_domain,
-		NT_STATUS_UNSUCCESSFUL); 
-
-	/* Return output parameters */
-
-	result = r.status;
-
-	return result;
-}
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index c75d77a..ed12927 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -32,68 +32,6 @@
 reads or writes a structure.
 ********************************************************************/
 
-void init_samr_q_remove_sid_foreign_domain(SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN * q_u, POLICY_HND *dom_pol, DOM_SID *sid)
-{
-	DEBUG(5, ("samr_init_samr_q_remove_sid_foreign_domain\n"));
-
-	q_u->dom_pol = *dom_pol;
-	init_dom_sid2(&q_u->sid, sid);
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_remove_sid_foreign_domain(const char *desc, SAMR_Q_REMOVE_SID_FOREIGN_DOMAIN * q_u,
-			  prs_struct *ps, int depth)
-{
-	if (q_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "samr_io_q_remove_sid_foreign_domain");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!smb_io_pol_hnd("domain_pol", &q_u->dom_pol, ps, depth))
-		return False;
-
-	if(!smb_io_dom_sid2("sid", &q_u->sid, ps, depth))
-		return False;
-
-	if(!prs_align(ps))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_remove_sid_foreign_domain(const char *desc, SAMR_R_REMOVE_SID_FOREIGN_DOMAIN * r_u,
-			  prs_struct *ps, int depth)
-{
-	if (r_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "samr_io_r_remove_sid_foreign_domain");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!prs_ntstatus("status", ps, depth, &r_u->status))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
 void init_samr_q_query_domain_info(SAMR_Q_QUERY_DOMAIN_INFO * q_u,
 				   POLICY_HND *domain_pol, uint16 switch_value)
 {
@@ -2175,139 +2113,6 @@ bool samr_io_r_query_groupinfo(const char *desc, SAMR_R_QUERY_GROUPINFO * r_u,
 }
 
 /*******************************************************************
-inits a SAMR_Q_QUERY_GROUPMEM structure.
-********************************************************************/
-
-void init_samr_q_query_groupmem(SAMR_Q_QUERY_GROUPMEM * q_c, POLICY_HND *hnd)
-{
-	DEBUG(5, ("init_samr_q_query_groupmem\n"));
-
-	q_c->group_pol = *hnd;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_query_groupmem(const char *desc, SAMR_Q_QUERY_GROUPMEM * q_u,
-			      prs_struct *ps, int depth)
-{
-	if (q_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "samr_io_q_query_groupmem");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!smb_io_pol_hnd("group_pol", &q_u->group_pol, ps, depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
-inits a SAMR_R_QUERY_GROUPMEM structure.
-********************************************************************/
-
-void init_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM * r_u,
-				uint32 num_entries, uint32 *rid,
-				uint32 *attr, NTSTATUS status)
-{
-	DEBUG(5, ("init_samr_r_query_groupmem\n"));
-
-	if (NT_STATUS_IS_OK(status)) {
-		r_u->ptr = 1;
-		r_u->num_entries = num_entries;
-
-		r_u->ptr_attrs = attr != NULL ? 1 : 0;
-		r_u->ptr_rids = rid != NULL ? 1 : 0;
-
-		r_u->num_rids = num_entries;
-		r_u->rid = rid;
-
-		r_u->num_attrs = num_entries;
-		r_u->attr = attr;
-	} else {
-		r_u->ptr = 0;
-		r_u->num_entries = 0;
-	}
-
-	r_u->status = status;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_query_groupmem(const char *desc, SAMR_R_QUERY_GROUPMEM * r_u,
-			      prs_struct *ps, int depth)
-{
-	uint32 i;
-
-	if (r_u == NULL)
-		return False;
-
-	if (UNMARSHALLING(ps))
-		ZERO_STRUCTP(r_u);
-
-	prs_debug(ps, depth, desc, "samr_io_r_query_groupmem");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!prs_uint32("ptr", ps, depth, &r_u->ptr))
-		return False;
-	if(!prs_uint32("num_entries ", ps, depth, &r_u->num_entries))
-		return False;
-
-	if (r_u->ptr != 0) {
-		if(!prs_uint32("ptr_rids ", ps, depth, &r_u->ptr_rids))
-			return False;
-		if(!prs_uint32("ptr_attrs", ps, depth, &r_u->ptr_attrs))
-			return False;
-
-		if (r_u->ptr_rids != 0)	{
-			if(!prs_uint32("num_rids", ps, depth, &r_u->num_rids))
-				return False;
-			if (UNMARSHALLING(ps) && r_u->num_rids != 0) {
-				r_u->rid = PRS_ALLOC_MEM(ps,uint32,r_u->num_rids);
-				if (r_u->rid == NULL)
-					return False;
-			}
-
-			for (i = 0; i < r_u->num_rids; i++) {
-				if(!prs_uint32("", ps, depth, &r_u->rid[i]))
-					return False;
-			}
-		}
-
-		if (r_u->ptr_attrs != 0) {
-			if(!prs_uint32("num_attrs", ps, depth, &r_u->num_attrs))
-				return False;
-
-			if (UNMARSHALLING(ps) && r_u->num_attrs != 0) {
-				r_u->attr = PRS_ALLOC_MEM(ps,uint32,r_u->num_attrs);
-				if (r_u->attr == NULL)
-					return False;
-			}
-
-			for (i = 0; i < r_u->num_attrs; i++) {
-				if(!prs_uint32("", ps, depth, &r_u->attr[i]))
-					return False;
-			}
-		}
-	}
-
-	if(!prs_ntstatus("status", ps, depth, &r_u->status))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
 inits a SAMR_Q_QUERY_USERGROUPS structure.
 ********************************************************************/
 
@@ -3131,185 +2936,6 @@ bool samr_io_r_set_aliasinfo(const char *desc, SAMR_R_SET_ALIASINFO * r_u,
 }
 
 /*******************************************************************
-inits a SAMR_Q_QUERY_USERALIASES structure.
-********************************************************************/
-
-void init_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES * q_u,
-				   POLICY_HND *hnd,
-				   uint32 num_sids,
-				   uint32 *ptr_sid, DOM_SID2 * sid)
-{
-	DEBUG(5, ("init_samr_q_query_useraliases\n"));
-
-	q_u->pol = *hnd;
-
-	q_u->num_sids1 = num_sids;
-	q_u->ptr = 1;
-	q_u->num_sids2 = num_sids;
-
-	q_u->ptr_sid = ptr_sid;
-	q_u->sid = sid;
-}
-
-/*******************************************************************
-reads or writes a SAMR_Q_QUERY_USERALIASES structure.
-********************************************************************/
-
-bool samr_io_q_query_useraliases(const char *desc, SAMR_Q_QUERY_USERALIASES * q_u,
-				 prs_struct *ps, int depth)
-{
-	fstring tmp;
-	uint32 i;
-
-	if (q_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "samr_io_q_query_useraliases");


-- 
Samba Shared Repository


More information about the samba-cvs mailing list