[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1749-g905b389

Günther Deschner gd at samba.org
Fri Feb 1 09:18:56 GMT 2008


The branch, v3-2-test has been updated
       via  905b3898e0ac7a1f9cca4575246df419b0a1c7f1 (commit)
       via  1b620ea648a20dc54c9c8bc21affbdbb2174ebea (commit)
       via  5bd8f7067db8479ad4beb8e49d9106e43495ecec (commit)
      from  445887d805c26beea33b6e5b08717e2841abe7b2 (commit)

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


- Log -----------------------------------------------------------------
commit 905b3898e0ac7a1f9cca4575246df419b0a1c7f1
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 1 01:44:20 2008 +0100

    Remove unused marshalling for SAMR_DELETE_DOM_USER.
    
    Guenther

commit 1b620ea648a20dc54c9c8bc21affbdbb2174ebea
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 1 01:27:28 2008 +0100

    Remove rpccli_samr_delete_dom_user().
    
    Guenther

commit 5bd8f7067db8479ad4beb8e49d9106e43495ecec
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 1 01:26:36 2008 +0100

    Use rpccli_samr_DeleteUser() in net and rpcclient.
    
    Guenther

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

Summary of changes:
 source/include/rpc_samr.h     |   17 ------------
 source/rpc_client/cli_samr.c  |   33 -----------------------
 source/rpc_parse/parse_samr.c |   58 -----------------------------------------
 source/rpcclient/cmd_samr.c   |    3 +-
 source/utils/net_rpc.c        |    9 ++++--
 5 files changed, 8 insertions(+), 112 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h
index 97b0429..429a717 100644
--- a/source/include/rpc_samr.h
+++ b/source/include/rpc_samr.h
@@ -1521,23 +1521,6 @@ typedef struct r_samr_create_user_info
 } SAMR_R_CREATE_USER;
 
 
-/* SAMR_Q_DELETE_DOM_USER - delete domain user */
-typedef struct q_samr_delete_dom_user_info
-{
-    POLICY_HND user_pol;          /* policy handle */
-
-} SAMR_Q_DELETE_DOM_USER;
-
-
-/* SAMR_R_DELETE_DOM_USER - delete domain user */
-typedef struct r_samr_delete_dom_user_info
-{
-	POLICY_HND pol;       /* policy handle */
-	NTSTATUS status;        /* return status */
-
-} SAMR_R_DELETE_DOM_USER;
-
-
 /* SAMR_Q_QUERY_GROUPMEM - query group members */
 typedef struct q_samr_query_groupmem_info
 {
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c
index acf0b1b..ad1991d 100644
--- a/source/rpc_client/cli_samr.c
+++ b/source/rpc_client/cli_samr.c
@@ -1740,39 +1740,6 @@ NTSTATUS rpccli_samr_set_userinfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
 	return result;
 }
 
-/* Delete domain user */
-
-NTSTATUS rpccli_samr_delete_dom_user(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 
-                                  POLICY_HND *user_pol)
-{
-	prs_struct qbuf, rbuf;
-	SAMR_Q_DELETE_DOM_USER q;
-	SAMR_R_DELETE_DOM_USER r;
-	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-	DEBUG(10,("cli_samr_delete_dom_user\n"));
-
-	ZERO_STRUCT(q);
-	ZERO_STRUCT(r);
-
-	/* Marshall data and send request */
-
-	init_samr_q_delete_dom_user(&q, user_pol);
-
-	CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_DELETE_DOM_USER,
-		q, r,
-		qbuf, rbuf,
-		samr_io_q_delete_dom_user,
-		samr_io_r_delete_dom_user,
-		NT_STATUS_UNSUCCESSFUL); 
-
-	/* Return output parameters */
-
-	result = r.status;
-
-	return result;
-}
-
 /* Remove foreign SID */
 
 NTSTATUS rpccli_samr_remove_sid_foreign_domain(struct rpc_pipe_client *cli, 
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index 1ae056e..08a552e 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -4798,64 +4798,6 @@ bool samr_io_r_lookup_names(const char *desc, SAMR_R_LOOKUP_NAMES * r_u,
 }
 
 /*******************************************************************
-inits a SAMR_Q_DELETE_DOM_USER structure.
-********************************************************************/
-
-void init_samr_q_delete_dom_user(SAMR_Q_DELETE_DOM_USER * q_c,
-				 POLICY_HND *hnd)
-{
-	DEBUG(5, ("init_samr_q_delete_dom_user\n"));
-
-	q_c->user_pol = *hnd;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_delete_dom_user(const char *desc, SAMR_Q_DELETE_DOM_USER * q_u,
-			       prs_struct *ps, int depth)
-{
-	if (q_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "samr_io_q_delete_dom_user");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!smb_io_pol_hnd("user_pol", &q_u->user_pol, ps, depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_delete_dom_user(const char *desc, SAMR_R_DELETE_DOM_USER * r_u,
-			       prs_struct *ps, int depth)
-{
-	if (r_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "samr_io_r_delete_dom_user");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!smb_io_pol_hnd("pol", &r_u->pol, ps, depth))
-		return False;
-	if(!prs_ntstatus("status", ps, depth, &r_u->status))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
 reads or writes a structure.
 ********************************************************************/
 
diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c
index e086e97..04406b0 100644
--- a/source/rpcclient/cmd_samr.c
+++ b/source/rpcclient/cmd_samr.c
@@ -1905,7 +1905,8 @@ static NTSTATUS cmd_samr_delete_dom_user(struct rpc_pipe_client *cli,
 
 	/* Delete user */
 
-	result = rpccli_samr_delete_dom_user(cli, mem_ctx, &user_pol);
+	result = rpccli_samr_DeleteUser(cli, mem_ctx,
+					&user_pol);
 
 	if (!NT_STATUS_IS_OK(result))
 		goto done;
diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c
index 9119b6b..bfd181c 100644
--- a/source/utils/net_rpc.c
+++ b/source/utils/net_rpc.c
@@ -675,7 +675,8 @@ static NTSTATUS rpc_user_add_internals(const DOM_SID *domain_sid,
 			d_fprintf(stderr, "Failed to set password for user %s - %s\n", 
 				 acct_name, nt_errstr(result));
 
-			result = rpccli_samr_delete_dom_user(pipe_hnd, mem_ctx, &user_pol);
+			result = rpccli_samr_DeleteUser(pipe_hnd, mem_ctx,
+							&user_pol);
 
 			if (!NT_STATUS_IS_OK(result)) {
 				d_fprintf(stderr, "Failed to delete user %s - %s\n", 
@@ -790,7 +791,8 @@ static NTSTATUS rpc_user_del_internals(const DOM_SID *domain_sid,
 
 	/* Delete user */
 
-	result = rpccli_samr_delete_dom_user(pipe_hnd, mem_ctx, &user_pol);
+	result = rpccli_samr_DeleteUser(pipe_hnd, mem_ctx,
+					&user_pol);
 
 	if (!NT_STATUS_IS_OK(result)) {
 		goto done;
@@ -5560,7 +5562,8 @@ static NTSTATUS rpc_trustdom_del_internals(const DOM_SID *domain_sid,
 
 	/* Delete user */
 
-	result = rpccli_samr_delete_dom_user(pipe_hnd, mem_ctx, &user_pol);
+	result = rpccli_samr_DeleteUser(pipe_hnd, mem_ctx,
+					&user_pol);
 
 	if (!NT_STATUS_IS_OK(result)) {
 		goto done;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list