[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1924-ga114577

Günther Deschner gd at samba.org
Wed Feb 6 01:11:45 GMT 2008


The branch, v3-2-test has been updated
       via  a1145770d1c3bfcddb687a08e3e57a566c80fb73 (commit)
       via  c67581e1e49f7049d2ff25efe310593d19b1a0fb (commit)
       via  28ef04437c1e575944e392d83f014d77998ec3ff (commit)
      from  dd9fa33e968d4e641460fe1c6beb05dfe12fa918 (commit)

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


- Log -----------------------------------------------------------------
commit a1145770d1c3bfcddb687a08e3e57a566c80fb73
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 5 17:46:46 2008 +0100

    Remove most of SAM_UNK_INFO marshalling.
    
    Guenther

commit c67581e1e49f7049d2ff25efe310593d19b1a0fb
Author: Günther Deschner <gd at samba.org>
Date:   Tue Feb 5 17:42:15 2008 +0100

    Remove unused marshalling for SAMR_SET_DOMAIN_INFO.
    
    Guenther

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

    Remove unused marshalling for SAMR_QUERY_DOMAIN_INFO.
    
    Guenther

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

Summary of changes:
 source/include/rpc_samr.h     |  146 ----------
 source/rpc_client/cli_samr.c  |   82 ------
 source/rpc_parse/parse_samr.c |  634 -----------------------------------------
 3 files changed, 0 insertions(+), 862 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h
index 1b95b23..971a1a7 100644
--- a/source/include/rpc_samr.h
+++ b/source/include/rpc_samr.h
@@ -445,18 +445,6 @@ typedef struct sam_user_info_9
 } SAM_USER_INFO_9;
 
 
-/****************************************************************************
-SAMR_Q_QUERY_DOMAIN_INFO - probably a query on domain group info.
-*****************************************************************************/
-
-/* SAMR_Q_QUERY_DOMAIN_INFO - */
-typedef struct q_samr_query_domain_info
-{
-	POLICY_HND domain_pol;   /* policy handle */
-	uint16 switch_value;     /* 0x0002, 0x0001 */
-
-} SAMR_Q_QUERY_DOMAIN_INFO;
-
 typedef struct sam_unknown_info_1_inf
 {
 	uint16 min_length_password;
@@ -467,32 +455,6 @@ typedef struct sam_unknown_info_1_inf
 
 } SAM_UNK_INFO_1;
 
-typedef struct sam_unknown_info_2_inf
-{
-	NTTIME logout; /* whether users are forcibly disconnected when logon hours expire */
-	UNIHDR hdr_comment; /* comment according to samba4 idl */
-	UNIHDR hdr_domain; /* domain name unicode header */
-	UNIHDR hdr_server; /* server name unicode header */
-
-	/* put all the data in here, at the moment, including what the above
-	   pointer is referring to
-	 */
-
-	uint64 seq_num;
-	
-	uint32 unknown_4; /* 0x0000 0001 */
-	uint32 server_role;
-	uint32 unknown_6; /* 0x0000 0001 */
-	uint32 num_domain_usrs; /* number of users in domain */
-	uint32 num_domain_grps; /* number of domain groups in domain */
-	uint32 num_local_grps; /* number of local groups in domain */
-
-	UNISTR2 uni_comment; /* comment unicode string */
-	UNISTR2 uni_domain; /* domain name unicode string */
-	UNISTR2 uni_server; /* server name unicode string */
-
-} SAM_UNK_INFO_2;
-
 typedef struct sam_unknown_info_3_info
 {
 	NTTIME logout;	
@@ -501,97 +463,6 @@ typedef struct sam_unknown_info_3_info
 
 } SAM_UNK_INFO_3;
 
-typedef struct sam_unknown_info_4_inf
-{
-	UNIHDR hdr_comment; /* comment according to samba4 idl */
-	UNISTR2 uni_comment; /* comment unicode string */
-
-} SAM_UNK_INFO_4;
-
-typedef struct sam_unknown_info_5_inf
-{
-	UNIHDR hdr_domain; /* domain name unicode header */
-	UNISTR2 uni_domain; /* domain name unicode string */
-
-} SAM_UNK_INFO_5;
-
-typedef struct sam_unknown_info_6_info
-{
-	UNIHDR hdr_server; /* server name unicode header */
-	UNISTR2 uni_server; /* server name unicode string */
-
-} SAM_UNK_INFO_6;
-
-typedef struct sam_unknown_info_7_info
-{
-	uint16 server_role;
-
-} SAM_UNK_INFO_7;
-
-typedef struct sam_unknown_info_8_info
-{
-	uint64 seq_num;
-	NTTIME domain_create_time;
-
-} SAM_UNK_INFO_8;
-
-typedef struct sam_unknown_info_9_info
-{
-	uint32 unknown;
-
-} SAM_UNK_INFO_9;
-
-typedef struct sam_unknown_info_12_inf
-{
-	NTTIME duration;
-	NTTIME reset_count;
-	uint16 bad_attempt_lockout;
-
-} SAM_UNK_INFO_12;
-
-typedef struct sam_unknown_info_13_info
-{
-	uint64 seq_num;
-	NTTIME domain_create_time;
-	uint32 unknown1;
-	uint32 unknown2;
-
-} SAM_UNK_INFO_13;
-
-typedef struct sam_unknown_ctr_info
-{
-	union
-	{
-		SAM_UNK_INFO_1 inf1;
-		SAM_UNK_INFO_2 inf2;
-		SAM_UNK_INFO_3 inf3;
-		SAM_UNK_INFO_4 inf4;
-		SAM_UNK_INFO_5 inf5;
-		SAM_UNK_INFO_6 inf6;
-		SAM_UNK_INFO_7 inf7;
-		SAM_UNK_INFO_8 inf8;
-		SAM_UNK_INFO_9 inf9;
-		SAM_UNK_INFO_12 inf12;
-		SAM_UNK_INFO_13 inf13;
-
-	} info;
-
-} SAM_UNK_CTR;
-
-
-/* SAMR_R_QUERY_DOMAIN_INFO - */
-typedef struct r_samr_query_domain_info
-{
-	uint32 ptr_0;
-	uint16 switch_value; /* same as in query */
-
-	SAM_UNK_CTR *ctr;
-
-	NTSTATUS status;         /* return status */
-
-} SAMR_R_QUERY_DOMAIN_INFO;
-
-
 #define MAX_SAM_ENTRIES_W2K 0x400
 #define MAX_SAM_ENTRIES_W95 50
 /* The following should be the greater of the preceeding two. */
@@ -1380,21 +1251,4 @@ typedef struct sid_info_3
 
 } DOM_SID3;
 
-/* SAMR_Q_SET_DOMAIN_INFO */
-typedef struct q_samr_set_domain_info
-{
-	POLICY_HND domain_pol;   /* policy handle */
-	uint16 switch_value0;
-	uint16 switch_value;
-	SAM_UNK_CTR *ctr;
-
-} SAMR_Q_SET_DOMAIN_INFO;
-
-/* SAMR_R_SET_DOMAIN_INFO */
-typedef struct r_samr_set_domain_info
-{
-	NTSTATUS status;         /* return status */
-
-} SAMR_R_SET_DOMAIN_INFO;
-
 #endif /* _RPC_SAMR_H */
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c
index d9427e3..4765e52 100644
--- a/source/rpc_client/cli_samr.c
+++ b/source/rpc_client/cli_samr.c
@@ -467,88 +467,6 @@ NTSTATUS rpccli_samr_query_alias_info(struct rpc_pipe_client *cli, TALLOC_CTX *m
 	return result;
 }
 
-/* Query domain info */
-
-NTSTATUS rpccli_samr_query_dom_info(struct rpc_pipe_client *cli,
-				    TALLOC_CTX *mem_ctx, 
-				    POLICY_HND *domain_pol,
-				    uint16 switch_value,
-				    SAM_UNK_CTR *ctr)
-{
-	prs_struct qbuf, rbuf;
-	SAMR_Q_QUERY_DOMAIN_INFO q;
-	SAMR_R_QUERY_DOMAIN_INFO r;
-	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-	DEBUG(10,("cli_samr_query_dom_info\n"));
-
-	ZERO_STRUCT(q);
-	ZERO_STRUCT(r);
-
-	/* Marshall data and send request */
-
-	init_samr_q_query_domain_info(&q, domain_pol, switch_value);
-
-	r.ctr = ctr;
-
-	CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_DOMAIN_INFO,
-		q, r,
-		qbuf, rbuf,
-		samr_io_q_query_domain_info,
-		samr_io_r_query_domain_info,
-		NT_STATUS_UNSUCCESSFUL); 
-
-	/* Return output parameters */
-
-	if (!NT_STATUS_IS_OK(result = r.status)) {
-		goto done;
-	}
-
- done:
-
-	return result;
-}
-
-/* Set domain info */
-
-NTSTATUS rpccli_samr_set_domain_info(struct rpc_pipe_client *cli,
-				     TALLOC_CTX *mem_ctx, 
-				     POLICY_HND *domain_pol,
-				     uint16 switch_value,
-				     SAM_UNK_CTR *ctr)
-{
-	prs_struct qbuf, rbuf;
-	SAMR_Q_SET_DOMAIN_INFO q;
-	SAMR_R_SET_DOMAIN_INFO r;
-	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
-	DEBUG(10,("cli_samr_set_domain_info\n"));
-
-	ZERO_STRUCT(q);
-	ZERO_STRUCT(r);
-
-	/* Marshall data and send request */
-
-	init_samr_q_set_domain_info(&q, domain_pol, switch_value, ctr);
-
-	CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_SET_DOMAIN_INFO,
-		q, r,
-		qbuf, rbuf,
-		samr_io_q_set_domain_info,
-		samr_io_r_set_domain_info,
-		NT_STATUS_UNSUCCESSFUL); 
-
-	/* Return output parameters */
-
-	if (!NT_STATUS_IS_OK(result = r.status)) {
-		goto done;
-	}
-
- done:
-
-	return result;
-}
-
 /* User change password */
 
 NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index 9947f58..1c2cf57 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -29,44 +29,6 @@
 #define DBGC_CLASS DBGC_RPC_PARSE
 
 /*******************************************************************
-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)
-{
-	DEBUG(5, ("samr_init_samr_q_query_domain_info\n"));
-
-	q_u->domain_pol = *domain_pol;
-	q_u->switch_value = switch_value;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_query_domain_info(const char *desc, SAMR_Q_QUERY_DOMAIN_INFO * q_u,
-				 prs_struct *ps, int depth)
-{
-	if (q_u == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "samr_io_q_query_domain_info");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!smb_io_pol_hnd("domain_pol", &q_u->domain_pol, ps, depth))
-		return False;
-
-	if(!prs_uint16("switch_value", ps, depth, &q_u->switch_value))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
  inits a structure.
 ********************************************************************/
 
@@ -260,480 +222,6 @@ static bool sam_io_unk_info1(const char *desc, SAM_UNK_INFO_1 * u_1,
 }
 
 /*******************************************************************
-inits a structure.
-********************************************************************/
-
-void init_unk_info2(SAM_UNK_INFO_2 * u_2,
-			const char *comment, const char *domain, const char *server,
-			uint32 seq_num, uint32 num_users, uint32 num_groups, uint32 num_alias, NTTIME nt_logout, uint32 server_role)
-{
-	u_2->logout = nt_logout;
-
-	u_2->seq_num = seq_num;
-
-	
-	u_2->unknown_4 = 0x00000001;
-	u_2->server_role = server_role;
-	u_2->unknown_6 = 0x00000001;
-	u_2->num_domain_usrs = num_users;
-	u_2->num_domain_grps = num_groups;
-	u_2->num_local_grps = num_alias;
-
-	init_unistr2(&u_2->uni_comment, comment, UNI_FLAGS_NONE);
-	init_uni_hdr(&u_2->hdr_comment, &u_2->uni_comment);
-	init_unistr2(&u_2->uni_domain, domain, UNI_FLAGS_NONE);
-	init_uni_hdr(&u_2->hdr_domain, &u_2->uni_domain);
-	init_unistr2(&u_2->uni_server, server, UNI_FLAGS_NONE);
-	init_uni_hdr(&u_2->hdr_server, &u_2->uni_server);
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-static bool sam_io_unk_info2(const char *desc, SAM_UNK_INFO_2 * u_2,
-			     prs_struct *ps, int depth)
-{
-	if (u_2 == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "sam_io_unk_info2");
-	depth++;
-
-	if(!smb_io_time("logout", &u_2->logout, ps, depth))
-		return False;
-	if(!smb_io_unihdr("hdr_comment", &u_2->hdr_comment, ps, depth))
-		return False;
-	if(!smb_io_unihdr("hdr_domain", &u_2->hdr_domain, ps, depth))
-		return False;
-	if(!smb_io_unihdr("hdr_server", &u_2->hdr_server, ps, depth))
-		return False;
-
-	/* put all the data in here, at the moment, including what the above
-	   pointer is referring to
-	 */
-
-	if(!prs_uint64("seq_num ", ps, depth, &u_2->seq_num))
-		return False;
-
-	if(!prs_uint32("unknown_4 ", ps, depth, &u_2->unknown_4)) /* 0x0000 0001 */
-		return False;
-	if(!prs_uint32("server_role ", ps, depth, &u_2->server_role))
-		return False;
-	if(!prs_uint32("unknown_6 ", ps, depth, &u_2->unknown_6)) /* 0x0000 0001 */
-		return False;
-	if(!prs_uint32("num_domain_usrs ", ps, depth, &u_2->num_domain_usrs))
-		return False;
-	if(!prs_uint32("num_domain_grps", ps, depth, &u_2->num_domain_grps))
-		return False;
-	if(!prs_uint32("num_local_grps", ps, depth, &u_2->num_local_grps))
-		return False;
-
-	if(!smb_io_unistr2("uni_comment", &u_2->uni_comment, u_2->hdr_comment.buffer, ps, depth))
-		return False;
-	if(!smb_io_unistr2("uni_domain", &u_2->uni_domain, u_2->hdr_domain.buffer, ps, depth))
-		return False;
-	if(!smb_io_unistr2("uni_server", &u_2->uni_server, u_2->hdr_server.buffer, ps, depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
-inits a structure.
-********************************************************************/
-
-void init_unk_info3(SAM_UNK_INFO_3 *u_3, NTTIME nt_logout)
-{
-	u_3->logout = nt_logout;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-static bool sam_io_unk_info3(const char *desc, SAM_UNK_INFO_3 * u_3,
-			     prs_struct *ps, int depth)
-{
-	if (u_3 == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "sam_io_unk_info3");
-	depth++;
-
-	if(!smb_io_time("logout", &u_3->logout, ps, depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
-inits a structure.
-********************************************************************/
-
-void init_unk_info4(SAM_UNK_INFO_4 * u_4,const char *comment)
-{
-	init_unistr2(&u_4->uni_comment, comment, UNI_FLAGS_NONE);
-	init_uni_hdr(&u_4->hdr_comment, &u_4->uni_comment);
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-static bool sam_io_unk_info4(const char *desc, SAM_UNK_INFO_4 * u_4,
-			     prs_struct *ps, int depth)
-{
-	if (u_4 == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "sam_io_unk_info4");
-	depth++;
-
-	if(!smb_io_unihdr("hdr_comment", &u_4->hdr_comment, ps, depth))
-		return False;
-
-	if(!smb_io_unistr2("uni_comment", &u_4->uni_comment, u_4->hdr_comment.buffer, ps, depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
-inits a structure.
-********************************************************************/
-
-void init_unk_info5(SAM_UNK_INFO_5 * u_5,const char *domain)
-{
-	init_unistr2(&u_5->uni_domain, domain, UNI_FLAGS_NONE);
-	init_uni_hdr(&u_5->hdr_domain, &u_5->uni_domain);
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-static bool sam_io_unk_info5(const char *desc, SAM_UNK_INFO_5 * u_5,
-			     prs_struct *ps, int depth)
-{
-	if (u_5 == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "sam_io_unk_info5");
-	depth++;
-
-	if(!smb_io_unihdr("hdr_domain", &u_5->hdr_domain, ps, depth))
-		return False;
-
-	if(!smb_io_unistr2("uni_domain", &u_5->uni_domain, u_5->hdr_domain.buffer, ps, depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
-inits a structure.
-********************************************************************/
-
-void init_unk_info6(SAM_UNK_INFO_6 * u_6, const char *server)
-{
-	init_unistr2(&u_6->uni_server, server, UNI_FLAGS_NONE);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list