[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-test-1984-gc09e619
Günther Deschner
gd at samba.org
Thu Feb 7 23:19:28 GMT 2008
The branch, v3-2-test has been updated
via c09e619a58e8a8a5317627acbf05d8b08ffdf9f4 (commit)
via 66b79add353bf7a09f304eac5274cb89b23d7b06 (commit)
via b6d1283121359091683ea4d5e834a7139d891930 (commit)
from 0b630db298a863ca5e38c9ee7b0202a58c51c6d1 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit c09e619a58e8a8a5317627acbf05d8b08ffdf9f4
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 7 20:47:21 2008 +0100
Remove unused marshalling for SAMR_QUERY_DISPINFO.
Guenther
commit 66b79add353bf7a09f304eac5274cb89b23d7b06
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 7 20:46:02 2008 +0100
Use rpccli_samr_QueryDisplayInfo() all over the place.
Guenther
commit b6d1283121359091683ea4d5e834a7139d891930
Author: Günther Deschner <gd at samba.org>
Date: Thu Feb 7 17:57:20 2008 +0100
Use pidl for _samr_QueryDisplayInfo().
Guenther
-----------------------------------------------------------------------
Summary of changes:
source/include/rpc_samr.h | 188 --------
source/rpc_client/cli_samr.c | 51 ---
source/rpc_parse/parse_samr.c | 910 +++++----------------------------------
source/rpc_server/srv_samr.c | 23 +-
source/rpc_server/srv_samr_nt.c | 87 ++---
source/rpcclient/cmd_samr.c | 166 +++-----
source/utils/net_rpc.c | 65 ++--
source/winbindd/winbindd_rpc.c | 39 +-
8 files changed, 259 insertions(+), 1270 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h
index 5919bc7..086f61e 100644
--- a/source/include/rpc_samr.h
+++ b/source/include/rpc_samr.h
@@ -590,194 +590,6 @@ typedef struct r_samr_enum_dom_aliases_info
} SAMR_R_ENUM_DOM_ALIASES;
-/* -- Level 1 Display Info - User Information -- */
-
-typedef struct samr_entry_info1
-{
- uint32 user_idx;
-
- uint32 rid_user;
- uint32 acb_info;
-
- UNIHDR hdr_acct_name;
- UNIHDR hdr_user_name;
- UNIHDR hdr_user_desc;
-
-} SAM_ENTRY1;
-
-typedef struct samr_str_entry_info1
-{
- UNISTR2 uni_acct_name;
- UNISTR2 uni_full_name;
- UNISTR2 uni_acct_desc;
-
-} SAM_STR1;
-
-typedef struct sam_entry_info_1
-{
- SAM_ENTRY1 *sam;
- SAM_STR1 *str;
-
-} SAM_DISPINFO_1;
-
-
-/* -- Level 2 Display Info - Trust Account Information -- */
-
-typedef struct samr_entry_info2
-{
- uint32 user_idx;
-
- uint32 rid_user;
- uint32 acb_info;
-
- UNIHDR hdr_srv_name;
- UNIHDR hdr_srv_desc;
-
-} SAM_ENTRY2;
-
-typedef struct samr_str_entry_info2
-{
- UNISTR2 uni_srv_name;
- UNISTR2 uni_srv_desc;
-
-} SAM_STR2;
-
-typedef struct sam_entry_info_2
-{
- SAM_ENTRY2 *sam;
- SAM_STR2 *str;
-
-} SAM_DISPINFO_2;
-
-
-/* -- Level 3 Display Info - Domain Group Information -- */
-
-typedef struct samr_entry_info3
-{
- uint32 grp_idx;
-
- uint32 rid_grp;
- uint32 attr; /* SE_GROUP_xxx, usually 7 */
-
- UNIHDR hdr_grp_name;
- UNIHDR hdr_grp_desc;
-
-} SAM_ENTRY3;
-
-typedef struct samr_str_entry_info3
-{
- UNISTR2 uni_grp_name;
- UNISTR2 uni_grp_desc;
-
-} SAM_STR3;
-
-typedef struct sam_entry_info_3
-{
- SAM_ENTRY3 *sam;
- SAM_STR3 *str;
-
-} SAM_DISPINFO_3;
-
-
-/* -- Level 4 Display Info - User List (ASCII) -- */
-
-typedef struct samr_entry_info4
-{
- uint32 user_idx;
- STRHDR hdr_acct_name;
-
-} SAM_ENTRY4;
-
-typedef struct samr_str_entry_info4
-{
- STRING2 acct_name;
-
-} SAM_STR4;
-
-typedef struct sam_entry_info_4
-{
- SAM_ENTRY4 *sam;
- SAM_STR4 *str;
-
-} SAM_DISPINFO_4;
-
-
-/* -- Level 5 Display Info - Group List (ASCII) -- */
-
-typedef struct samr_entry_info5
-{
- uint32 grp_idx;
- STRHDR hdr_grp_name;
-
-} SAM_ENTRY5;
-
-typedef struct samr_str_entry_info5
-{
- STRING2 grp_name;
-
-} SAM_STR5;
-
-typedef struct sam_entry_info_5
-{
- SAM_ENTRY5 *sam;
- SAM_STR5 *str;
-
-} SAM_DISPINFO_5;
-
-
-typedef struct sam_dispinfo_ctr_info
-{
- union
- {
- SAM_DISPINFO_1 *info1; /* users/names/descriptions */
- SAM_DISPINFO_2 *info2; /* trust accounts */
- SAM_DISPINFO_3 *info3; /* domain groups/descriptions */
- SAM_DISPINFO_4 *info4; /* user list (ASCII) - used by Win95 */
- SAM_DISPINFO_5 *info5; /* group list (ASCII) */
- void *info; /* allows assignment without typecasting, */
-
- } sam;
-
-} SAM_DISPINFO_CTR;
-
-
-/* SAMR_Q_QUERY_DISPINFO - SAM rids, names and descriptions */
-typedef struct q_samr_query_disp_info
-{
- POLICY_HND domain_pol;
-
- uint16 switch_level; /* see SAM_DISPINFO_CTR above */
- /* align */
-
- uint32 start_idx; /* start enumeration index */
- uint32 max_entries; /* maximum number of entries to return */
- uint32 max_size; /* recommended data size; if exceeded server
- should return STATUS_MORE_ENTRIES */
-
-} SAMR_Q_QUERY_DISPINFO;
-
-
-/* SAMR_R_QUERY_DISPINFO */
-typedef struct r_samr_query_dispinfo_info
-{
- uint32 total_size; /* total data size for all matching entries
- (0 = uncalculated) */
- uint32 data_size; /* actual data size returned = size of SAM_ENTRY
- structures + total length of strings */
-
- uint16 switch_level; /* see SAM_DISPINFO_CTR above */
- /* align */
-
- uint32 num_entries; /* number of entries returned */
- uint32 ptr_entries;
- uint32 num_entries2;
-
- SAM_DISPINFO_CTR *ctr;
-
- NTSTATUS status;
-
-} SAMR_R_QUERY_DISPINFO;
-
/* SAMR_Q_GET_DISPENUM_INDEX */
typedef struct q_samr_get_dispenum_index
{
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c
index 858bfc3..ea25ddf 100644
--- a/source/rpc_client/cli_samr.c
+++ b/source/rpc_client/cli_samr.c
@@ -510,57 +510,6 @@ void get_query_dispinfo_params(int loop_count, uint32 *max_entries,
*max_size = 131071;
break;
}
-}
-
-/* Query display info */
-
-NTSTATUS rpccli_samr_query_dispinfo(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *domain_pol, uint32 *start_idx,
- uint16 switch_value, uint32 *num_entries,
- uint32 max_entries, uint32 max_size,
- SAM_DISPINFO_CTR *ctr)
-{
- prs_struct qbuf, rbuf;
- SAMR_Q_QUERY_DISPINFO q;
- SAMR_R_QUERY_DISPINFO r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- DEBUG(10,("cli_samr_query_dispinfo for start_idx = %u\n", *start_idx));
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- *num_entries = 0;
-
- /* Marshall data and send request */
-
- init_samr_q_query_dispinfo(&q, domain_pol, switch_value,
- *start_idx, max_entries, max_size);
-
- r.ctr = ctr;
-
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_DISPINFO,
- q, r,
- qbuf, rbuf,
- samr_io_q_query_dispinfo,
- samr_io_r_query_dispinfo,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- result = r.status;
-
- if (!NT_STATUS_IS_OK(result) &&
- NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) {
- goto done;
- }
-
- *num_entries = r.num_entries;
- *start_idx += r.num_entries; /* No next_idx in this structure! */
-
- done:
- return result;
}
/* Lookup rids. Note that NT4 seems to crash if more than ~1000 rids are
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index 3c1fb9b..09804f1 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -41,6 +41,15 @@ static void init_lsa_String(struct lsa_String *name, const char *s)
inits a structure.
********************************************************************/
+static void init_lsa_AsciiString(struct lsa_AsciiString *name, const char *s)
+{
+ name->string = s;
+}
+
+/*******************************************************************
+ inits a structure.
+********************************************************************/
+
void init_samr_DomInfo1(struct samr_DomInfo1 *r,
uint16_t min_password_length,
uint16_t password_history_length,
@@ -172,312 +181,6 @@ void init_samr_DomInfo12(struct samr_DomInfo12 *r,
}
/*******************************************************************
-reads or writes a SAM_STR1 structure.
-********************************************************************/
-
-static bool sam_io_sam_str1(const char *desc, SAM_STR1 * sam, uint32 acct_buf,
- uint32 name_buf, uint32 desc_buf,
- prs_struct *ps, int depth)
-{
- if (sam == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "sam_io_sam_str1");
- depth++;
-
- if(!prs_align(ps))
- return False;
- if (!smb_io_unistr2("name", &sam->uni_acct_name, acct_buf, ps, depth))
- return False;
-
- if (!smb_io_unistr2("desc", &sam->uni_acct_desc, desc_buf, ps, depth))
- return False;
-
- if (!smb_io_unistr2("full", &sam->uni_full_name, name_buf, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-inits a SAM_ENTRY1 structure.
-********************************************************************/
-
-static void init_sam_entry1(SAM_ENTRY1 *sam, uint32 user_idx,
- UNISTR2 *sam_name, UNISTR2 *sam_full,
- UNISTR2 *sam_desc, uint32 rid_user,
- uint32 acb_info)
-{
- DEBUG(5, ("init_sam_entry1\n"));
-
- ZERO_STRUCTP(sam);
-
- sam->user_idx = user_idx;
- sam->rid_user = rid_user;
- sam->acb_info = acb_info;
-
- init_uni_hdr(&sam->hdr_acct_name, sam_name);
- init_uni_hdr(&sam->hdr_user_name, sam_full);
- init_uni_hdr(&sam->hdr_user_desc, sam_desc);
-}
-
-/*******************************************************************
-reads or writes a SAM_ENTRY1 structure.
-********************************************************************/
-
-static bool sam_io_sam_entry1(const char *desc, SAM_ENTRY1 * sam,
- prs_struct *ps, int depth)
-{
- if (sam == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "sam_io_sam_entry1");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("user_idx ", ps, depth, &sam->user_idx))
- return False;
-
- if(!prs_uint32("rid_user ", ps, depth, &sam->rid_user))
- return False;
- if(!prs_uint32("acb_info ", ps, depth, &sam->acb_info))
- return False;
-
- if (!smb_io_unihdr("hdr_acct_name", &sam->hdr_acct_name, ps, depth))
- return False;
- if (!smb_io_unihdr("hdr_user_desc", &sam->hdr_user_desc, ps, depth))
- return False;
- if (!smb_io_unihdr("hdr_user_name", &sam->hdr_user_name, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes a SAM_STR2 structure.
-********************************************************************/
-
-static bool sam_io_sam_str2(const char *desc, SAM_STR2 * sam, uint32 acct_buf,
- uint32 desc_buf, prs_struct *ps, int depth)
-{
- if (sam == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "sam_io_sam_str2");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_unistr2("uni_srv_name", &sam->uni_srv_name, acct_buf, ps, depth)) /* account name unicode string */
- return False;
- if(!smb_io_unistr2("uni_srv_desc", &sam->uni_srv_desc, desc_buf, ps, depth)) /* account desc unicode string */
- return False;
-
- return True;
-}
-
-/*******************************************************************
-inits a SAM_ENTRY2 structure.
-********************************************************************/
-static void init_sam_entry2(SAM_ENTRY2 * sam, uint32 user_idx,
- UNISTR2 *sam_name, UNISTR2 *sam_desc,
- uint32 rid_user, uint32 acb_info)
-{
- DEBUG(5, ("init_sam_entry2\n"));
-
- sam->user_idx = user_idx;
- sam->rid_user = rid_user;
- sam->acb_info = acb_info;
-
- init_uni_hdr(&sam->hdr_srv_name, sam_name);
- init_uni_hdr(&sam->hdr_srv_desc, sam_desc);
-}
-
-/*******************************************************************
-reads or writes a SAM_ENTRY2 structure.
-********************************************************************/
-
-static bool sam_io_sam_entry2(const char *desc, SAM_ENTRY2 * sam,
- prs_struct *ps, int depth)
-{
- if (sam == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "sam_io_sam_entry2");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("user_idx ", ps, depth, &sam->user_idx))
- return False;
-
- if(!prs_uint32("rid_user ", ps, depth, &sam->rid_user))
- return False;
- if(!prs_uint32("acb_info ", ps, depth, &sam->acb_info))
- return False;
-
- if(!smb_io_unihdr("unihdr", &sam->hdr_srv_name, ps, depth)) /* account name unicode string header */
- return False;
- if(!smb_io_unihdr("unihdr", &sam->hdr_srv_desc, ps, depth)) /* account name unicode string header */
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes a SAM_STR3 structure.
-********************************************************************/
-
-static bool sam_io_sam_str3(const char *desc, SAM_STR3 * sam, uint32 acct_buf,
- uint32 desc_buf, prs_struct *ps, int depth)
-{
- if (sam == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "sam_io_sam_str3");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_unistr2("uni_grp_name", &sam->uni_grp_name, acct_buf, ps, depth)) /* account name unicode string */
- return False;
- if(!smb_io_unistr2("uni_grp_desc", &sam->uni_grp_desc, desc_buf, ps, depth)) /* account desc unicode string */
- return False;
-
- return True;
-}
-
-/*******************************************************************
-inits a SAM_ENTRY3 structure.
-********************************************************************/
-
-static void init_sam_entry3(SAM_ENTRY3 * sam, uint32 grp_idx,
- UNISTR2 *grp_name, UNISTR2 *grp_desc,
- uint32 rid_grp)
-{
- DEBUG(5, ("init_sam_entry3\n"));
-
- sam->grp_idx = grp_idx;
- sam->rid_grp = rid_grp;
- sam->attr = 0x07; /* group rid attributes - gets ignored by nt 4.0 */
-
- init_uni_hdr(&sam->hdr_grp_name, grp_name);
- init_uni_hdr(&sam->hdr_grp_desc, grp_desc);
-}
-
-/*******************************************************************
-reads or writes a SAM_ENTRY3 structure.
-********************************************************************/
-
-static bool sam_io_sam_entry3(const char *desc, SAM_ENTRY3 * sam,
- prs_struct *ps, int depth)
-{
- if (sam == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "sam_io_sam_entry3");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("grp_idx", ps, depth, &sam->grp_idx))
--
Samba Shared Repository
More information about the samba-cvs
mailing list