summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-07 14:01:58 +0100
committerGünther Deschner <gd@samba.org>2008-02-07 14:13:09 +0100
commit815ab1ac949a6d71f062f8dd1d7ffe45196780db (patch)
tree757c44e5c3aee7bee623824b7fe766a6c09a9287
parent1ec50b50e16a78e0bbbe5f5ad70b8a35d01a973e (diff)
downloadsamba-815ab1ac949a6d71f062f8dd1d7ffe45196780db.tar.gz
samba-815ab1ac949a6d71f062f8dd1d7ffe45196780db.tar.bz2
samba-815ab1ac949a6d71f062f8dd1d7ffe45196780db.zip
Remove unused marshalling for SAMR_QUERY_GROUPINFO.
Guenther (This used to be commit 680dbd3ef6b1e42db2fbf5b11308b02d961a7688)
-rw-r--r--source3/include/rpc_samr.h87
-rw-r--r--source3/rpc_client/cli_samr.c36
-rw-r--r--source3/rpc_parse/parse_samr.c290
3 files changed, 0 insertions, 413 deletions
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h
index 2b233397f4..37a457e4df 100644
--- a/source3/include/rpc_samr.h
+++ b/source3/include/rpc_samr.h
@@ -795,93 +795,6 @@ typedef struct r_samr_get_dispenum_index
} SAMR_R_GET_DISPENUM_INDEX;
-/* SAMR_Q_QUERY_GROUPINFO - SAM Group Info */
-typedef struct q_samr_query_group_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint16 switch_level; /* 0x0001 seen */
-
-} SAMR_Q_QUERY_GROUPINFO;
-
-typedef struct samr_group_info1
-{
- UNIHDR hdr_acct_name;
-
- uint32 group_attr; /* 0x0000 0003 - group attribute */
- uint32 num_members; /* 0x0000 0001 - number of group members? */
-
- UNIHDR hdr_acct_desc;
-
- UNISTR2 uni_acct_name;
- UNISTR2 uni_acct_desc;
-
-} GROUP_INFO1;
-
-typedef struct samr_group_info2
-{
- uint16 level;
- UNIHDR hdr_acct_name;
- UNISTR2 uni_acct_name;
-
-} GROUP_INFO2;
-
-typedef struct samr_group_info3
-{
- uint32 group_attr; /* 0x0000 0003 - group attribute */
-
-} GROUP_INFO3;
-
-typedef struct samr_group_info4
-{
- uint16 level;
- UNIHDR hdr_acct_desc;
- UNISTR2 uni_acct_desc;
-
-} GROUP_INFO4;
-
-typedef struct samr_group_info5
-{
- UNIHDR hdr_acct_name;
-
- uint32 group_attr; /* 0x0000 0003 - group attribute */
- uint32 num_members; /* 0x0000 0001 - number of group members? */
-
- UNIHDR hdr_acct_desc;
-
- UNISTR2 uni_acct_name;
- UNISTR2 uni_acct_desc;
-
-} GROUP_INFO5;
-
-
-/* GROUP_INFO_CTR */
-typedef struct group_info_ctr
-{
- uint16 switch_value1;
-
- union
- {
- GROUP_INFO1 info1;
- GROUP_INFO2 info2;
- GROUP_INFO3 info3;
- GROUP_INFO4 info4;
- GROUP_INFO5 info5;
- } group;
-
-} GROUP_INFO_CTR;
-
-/* SAMR_R_QUERY_GROUPINFO - SAM Group Info */
-typedef struct r_samr_query_groupinfo_info
-{
- uint32 ptr;
- GROUP_INFO_CTR *ctr;
-
- NTSTATUS status;
-
-} SAMR_R_QUERY_GROUPINFO;
-
-
/********************************************************/
/********************************************************/
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 19c59f2685..eb37d6e7ab 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -64,42 +64,6 @@ NTSTATUS rpccli_samr_query_userinfo(struct rpc_pipe_client *cli,
return result;
}
-/* Query group info */
-
-NTSTATUS rpccli_samr_query_groupinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *group_pol, uint32 info_level,
- GROUP_INFO_CTR **ctr)
-{
- prs_struct qbuf, rbuf;
- SAMR_Q_QUERY_GROUPINFO q;
- SAMR_R_QUERY_GROUPINFO r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-
- DEBUG(10,("cli_samr_query_groupinfo\n"));
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- /* Marshall data and send request */
-
- init_samr_q_query_groupinfo(&q, group_pol, info_level);
-
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_GROUPINFO,
- q, r,
- qbuf, rbuf,
- samr_io_q_query_groupinfo,
- samr_io_r_query_groupinfo,
- NT_STATUS_UNSUCCESSFUL);
-
- *ctr = r.ctr;
-
- /* Return output parameters */
-
- result = r.status;
-
- return result;
-}
-
/* Query user groups */
NTSTATUS rpccli_samr_query_usergroups(struct rpc_pipe_client *cli,
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 468fe4af51..329b75451f 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -1277,49 +1277,6 @@ void init_samr_group_info1(struct samr_GroupInfoAll *r,
}
/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1,
- prs_struct *ps, int depth)
-{
- uint16 dummy = 1;
-
- if (gr1 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_group_info1");
- depth++;
-
- if(!prs_uint16("level", ps, depth, &dummy))
- return False;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_unihdr("hdr_acct_name", &gr1->hdr_acct_name, ps, depth))
- return False;
-
- if(!prs_uint32("group_attr", ps, depth, &gr1->group_attr))
- return False;
- if(!prs_uint32("num_members", ps, depth, &gr1->num_members))
- return False;
-
- if(!smb_io_unihdr("hdr_acct_desc", &gr1->hdr_acct_desc, ps, depth))
- return False;
-
- if(!smb_io_unistr2("uni_acct_name", &gr1->uni_acct_name,
- gr1->hdr_acct_name.buffer, ps, depth))
- return False;
-
- if(!smb_io_unistr2("uni_acct_desc", &gr1->uni_acct_desc,
- gr1->hdr_acct_desc.buffer, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
inits a lsa_String structure
********************************************************************/
@@ -1331,30 +1288,6 @@ void init_samr_group_info2(struct lsa_String *r, const char *group_name)
}
/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_group_info2(const char *desc, GROUP_INFO2 *gr2, prs_struct *ps, int depth)
-{
- if (gr2 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_group_info2");
- depth++;
-
- if(!prs_uint16("hdr_level", ps, depth, &gr2->level))
- return False;
-
- if(!smb_io_unihdr("hdr_acct_name", &gr2->hdr_acct_name, ps, depth))
- return False;
- if(!smb_io_unistr2("uni_acct_name", &gr2->uni_acct_name,
- gr2->hdr_acct_name.buffer, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
inits a samr_GroupInfoAttributes structure.
********************************************************************/
@@ -1367,27 +1300,6 @@ void init_samr_group_info3(struct samr_GroupInfoAttributes *r,
}
/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_group_info3(const char *desc, GROUP_INFO3 *gr3, prs_struct *ps, int depth)
-{
- if (gr3 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_group_info3");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("group_attr", ps, depth, &gr3->group_attr))
- return False;
-
- return True;
-}
-
-/*******************************************************************
inits a lsa_String structure
********************************************************************/
@@ -1399,31 +1311,6 @@ void init_samr_group_info4(struct lsa_String *r, const char *description)
}
/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_group_info4(const char *desc, GROUP_INFO4 * gr4,
- prs_struct *ps, int depth)
-{
- if (gr4 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_group_info4");
- depth++;
-
- if(!prs_uint16("hdr_level", ps, depth, &gr4->level))
- return False;
- if(!smb_io_unihdr("hdr_acct_desc", &gr4->hdr_acct_desc, ps, depth))
- return False;
- if(!smb_io_unistr2("uni_acct_desc", &gr4->uni_acct_desc,
- gr4->hdr_acct_desc.buffer, ps, depth))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
inits a samr_GroupInfoAll structure.
********************************************************************/
@@ -1442,183 +1329,6 @@ void init_samr_group_info5(struct samr_GroupInfoAll *r,
}
/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_group_info5(const char *desc, GROUP_INFO5 * gr5,
- prs_struct *ps, int depth)
-{
- uint16 dummy = 1;
-
- if (gr5 == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_group_info5");
- depth++;
-
- if(!prs_uint16("level", ps, depth, &dummy))
- return False;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_unihdr("hdr_acct_name", &gr5->hdr_acct_name, ps, depth))
- return False;
-
- if(!prs_uint32("group_attr", ps, depth, &gr5->group_attr))
- return False;
- if(!prs_uint32("num_members", ps, depth, &gr5->num_members))
- return False;
-
- if(!smb_io_unihdr("hdr_acct_desc", &gr5->hdr_acct_desc, ps, depth))
- return False;
-
- if(!smb_io_unistr2("uni_acct_name", &gr5->uni_acct_name,
- gr5->hdr_acct_name.buffer, ps, depth))
- return False;
-
- if(!smb_io_unistr2("uni_acct_desc", &gr5->uni_acct_desc,
- gr5->hdr_acct_desc.buffer, ps, depth))
- return False;
-
- return True;
-}
-
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-static bool samr_group_info_ctr(const char *desc, GROUP_INFO_CTR **ctr,
- prs_struct *ps, int depth)
-{
- if (UNMARSHALLING(ps))
- *ctr = PRS_ALLOC_MEM(ps,GROUP_INFO_CTR,1);
-
- if (*ctr == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_group_info_ctr");
- depth++;
-
- if(!prs_uint16("switch_value1", ps, depth, &(*ctr)->switch_value1))
- return False;
-
- switch ((*ctr)->switch_value1) {
- case 1:
- if(!samr_io_group_info1("group_info1", &(*ctr)->group.info1, ps, depth))
- return False;
- break;
- case 2:
- if(!samr_io_group_info2("group_info2", &(*ctr)->group.info2, ps, depth))
- return False;
- break;
- case 3:
- if(!samr_io_group_info3("group_info3", &(*ctr)->group.info3, ps, depth))
- return False;
- break;
- case 4:
- if(!samr_io_group_info4("group_info4", &(*ctr)->group.info4, ps, depth))
- return False;
- break;
- case 5:
- if(!samr_io_group_info5("group_info5", &(*ctr)->group.info5, ps, depth))
- return False;
- break;
- default:
- DEBUG(0,("samr_group_info_ctr: unsupported switch level\n"));
- break;
- }
-
- return True;
-}
-
-/*******************************************************************
-inits a SAMR_Q_QUERY_GROUPINFO structure.
-********************************************************************/
-
-void init_samr_q_query_groupinfo(SAMR_Q_QUERY_GROUPINFO * q_e,
- POLICY_HND *pol, uint16 switch_level)
-{
- DEBUG(5, ("init_samr_q_query_groupinfo\n"));
-
- q_e->pol = *pol;
-
- q_e->switch_level = switch_level;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_q_query_groupinfo(const char *desc, SAMR_Q_QUERY_GROUPINFO * q_e,
- prs_struct *ps, int depth)
-{
- if (q_e == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_q_query_groupinfo");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("pol", &q_e->pol, ps, depth))
- return False;
-
- if(!prs_uint16("switch_level", ps, depth, &q_e->switch_level))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-inits a SAMR_R_QUERY_GROUPINFO structure.
-********************************************************************/
-
-void init_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO * r_u,
- GROUP_INFO_CTR * ctr, NTSTATUS status)
-{
- DEBUG(5, ("init_samr_r_query_groupinfo\n"));
-
- r_u->ptr = (NT_STATUS_IS_OK(status) && ctr != NULL) ? 1 : 0;
- r_u->ctr = ctr;
- r_u->status = status;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_query_groupinfo(const char *desc, SAMR_R_QUERY_GROUPINFO * r_u,
- prs_struct *ps, int depth)
-{
- if (r_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_r_query_groupinfo");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("ptr", ps, depth, &r_u->ptr))
- return False;
-
- if (r_u->ptr != 0) {
- if(!samr_group_info_ctr("ctr", &r_u->ctr, ps, depth))
- return False;
- }
-
- if(!prs_align(ps))
- return False;
- if(!prs_ntstatus("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
inits a SAMR_Q_QUERY_USERGROUPS structure.
********************************************************************/