diff options
author | Günther Deschner <gd@samba.org> | 2008-02-06 16:22:48 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-07 14:25:29 +0100 |
commit | f564a5476b47f5ca92f1d36a395c439f425ae612 (patch) | |
tree | b9f7daad310d1c8fc3230243bb6ccbb44a0988d5 | |
parent | 1c788bc36561842d08c3f62b5d3145dbe74db620 (diff) | |
download | samba-f564a5476b47f5ca92f1d36a395c439f425ae612.tar.gz samba-f564a5476b47f5ca92f1d36a395c439f425ae612.tar.bz2 samba-f564a5476b47f5ca92f1d36a395c439f425ae612.zip |
Remove unused marshalling for SAMR_QUERY_USERGROUPS.
Guenther
(This used to be commit 232a505535de04121a631b3bb24a2700df07ee1e)
-rw-r--r-- | source3/include/rpc_samr.h | 21 | ||||
-rw-r--r-- | source3/rpc_client/cli_samr.c | 39 | ||||
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 138 |
3 files changed, 0 insertions, 198 deletions
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h index 37a457e4df..5919bc7910 100644 --- a/source3/include/rpc_samr.h +++ b/source3/include/rpc_samr.h @@ -798,27 +798,6 @@ typedef struct r_samr_get_dispenum_index /********************************************************/ /********************************************************/ -/* SAMR_Q_QUERY_USERGROUPS - */ -typedef struct q_samr_query_usergroup_info -{ - POLICY_HND pol; /* policy handle associated with unknown id */ - -} SAMR_Q_QUERY_USERGROUPS; - -/* SAMR_R_QUERY_USERGROUPS - probably a get sam info */ -typedef struct r_samr_query_usergroup_info -{ - uint32 ptr_0; /* pointer */ - uint32 num_entries; /* number of RID groups */ - uint32 ptr_1; /* pointer */ - uint32 num_entries2; /* number of RID groups */ - - DOM_GID *gid; /* group info */ - - NTSTATUS status; /* return status */ - -} SAMR_R_QUERY_USERGROUPS; - /* SAM_USERINFO_CTR - sam user info */ typedef struct sam_userinfo_ctr_info { diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index eb37d6e7ab..858bfc304b 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -64,45 +64,6 @@ NTSTATUS rpccli_samr_query_userinfo(struct rpc_pipe_client *cli, return result; } -/* Query user groups */ - -NTSTATUS rpccli_samr_query_usergroups(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, - uint32 *num_groups, - DOM_GID **gid) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_USERGROUPS q; - SAMR_R_QUERY_USERGROUPS r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - DEBUG(10,("cli_samr_query_usergroups\n")); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Marshall data and send request */ - - init_samr_q_query_usergroups(&q, user_pol); - - CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_USERGROUPS, - q, r, - qbuf, rbuf, - samr_io_q_query_usergroups, - samr_io_r_query_usergroups, - NT_STATUS_UNSUCCESSFUL); - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *num_groups = r.num_entries; - *gid = r.gid; - } - - return result; -} - /** * Enumerate domain users * diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 329b75451f..3c1fb9be3c 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -1329,144 +1329,6 @@ void init_samr_group_info5(struct samr_GroupInfoAll *r, } /******************************************************************* -inits a SAMR_Q_QUERY_USERGROUPS structure. -********************************************************************/ - -void init_samr_q_query_usergroups(SAMR_Q_QUERY_USERGROUPS * q_u, - POLICY_HND *hnd) -{ - DEBUG(5, ("init_samr_q_query_usergroups\n")); - - q_u->pol = *hnd; -} - -/******************************************************************* -reads or writes a structure. -********************************************************************/ - -bool samr_io_q_query_usergroups(const char *desc, SAMR_Q_QUERY_USERGROUPS * q_u, - prs_struct *ps, int depth) -{ - if (q_u == NULL) - return False; - - prs_debug(ps, depth, desc, "samr_io_q_query_usergroups"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("pol", &q_u->pol, ps, depth)) - return False; - - return True; -} - -/******************************************************************* -inits a SAMR_R_QUERY_USERGROUPS structure. -********************************************************************/ - -void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS * r_u, - uint32 num_gids, DOM_GID * gid, - NTSTATUS status) -{ - DEBUG(5, ("init_samr_r_query_usergroups\n")); - - if (NT_STATUS_IS_OK(status)) { - r_u->ptr_0 = 1; - r_u->num_entries = num_gids; - r_u->ptr_1 = (num_gids != 0) ? 1 : 0; - r_u->num_entries2 = num_gids; - - r_u->gid = gid; - } else { - r_u->ptr_0 = 0; - r_u->num_entries = 0; - r_u->ptr_1 = 0; - r_u->gid = NULL; - } - - r_u->status = status; -} - -/******************************************************************* -reads or writes a structure. -********************************************************************/ - -bool samr_io_gids(const char *desc, uint32 *num_gids, DOM_GID ** gid, - prs_struct *ps, int depth) -{ - uint32 i; - if (gid == NULL) - return False; - - prs_debug(ps, depth, desc, "samr_io_gids"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("num_gids", ps, depth, num_gids)) - return False; - - if ((*num_gids) != 0) { - if (UNMARSHALLING(ps)) { - (*gid) = PRS_ALLOC_MEM(ps,DOM_GID,*num_gids); - } - - if ((*gid) == NULL) { - return False; - } - - for (i = 0; i < (*num_gids); i++) { - if(!smb_io_gid("gids", &(*gid)[i], ps, depth)) - return False; - } - } - - return True; -} - -/******************************************************************* -reads or writes a structure. -********************************************************************/ - -bool samr_io_r_query_usergroups(const char *desc, SAMR_R_QUERY_USERGROUPS * r_u, - prs_struct *ps, int depth) -{ - if (r_u == NULL) - return False; - - prs_debug(ps, depth, desc, "samr_io_r_query_usergroups"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!prs_uint32("ptr_0 ", ps, depth, &r_u->ptr_0)) - return False; - - if (r_u->ptr_0 != 0) { - if(!prs_uint32("num_entries ", ps, depth, &r_u->num_entries)) - return False; - if(!prs_uint32("ptr_1 ", ps, depth, &r_u->ptr_1)) - return False; - - if (r_u->num_entries != 0 && r_u->ptr_1 != 0) { - if(!samr_io_gids("gids", &r_u->num_entries2, &r_u->gid, 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_ENUM_DOMAINS structure. ********************************************************************/ |