summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/rpc_samr.h36
-rw-r--r--source3/rpc_client/cli_samr.c52
-rw-r--r--source3/rpc_parse/parse_samr.c179
3 files changed, 0 insertions, 267 deletions
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h
index f499f673e9..7cbf179f54 100644
--- a/source3/include/rpc_samr.h
+++ b/source3/include/rpc_samr.h
@@ -1216,42 +1216,6 @@ typedef struct r_samr_query_user_info
/****************************************************************************
-SAMR_Q_QUERY_USERALIASES - do a conversion from name to RID.
-
-the policy handle allocated by an "samr open secret" call is associated
-with a SID. this policy handle is what is queried here, *not* the SID
-itself. the response to the lookup rids is relative to this SID.
-*****************************************************************************/
-/* SAMR_Q_QUERY_USERALIASES */
-typedef struct q_samr_query_useraliases_info
-{
- POLICY_HND pol; /* policy handle */
-
- uint32 num_sids1; /* number of rids being looked up */
- uint32 ptr; /* buffer pointer */
- uint32 num_sids2; /* number of rids being looked up */
-
- uint32 *ptr_sid; /* pointers to sids to be looked up */
- DOM_SID2 *sid ; /* sids to be looked up. */
-
-} SAMR_Q_QUERY_USERALIASES;
-
-
-/* SAMR_R_QUERY_USERALIASES */
-typedef struct r_samr_query_useraliases_info
-{
- uint32 num_entries;
- uint32 ptr; /* undocumented buffer pointer */
-
- uint32 num_entries2;
- uint32 *rid; /* domain RIDs being looked up */
-
- NTSTATUS status; /* return code */
-
-} SAMR_R_QUERY_USERALIASES;
-
-
-/****************************************************************************
SAMR_Q_LOOKUP_NAMES - do a conversion from Names to RIDs+types.
*****************************************************************************/
/* SAMR_Q_LOOKUP_NAMES */
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 5b477aaf20..97013c914e 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -200,58 +200,6 @@ NTSTATUS rpccli_samr_set_aliasinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
return result;
}
-/* Query user aliases */
-
-NTSTATUS rpccli_samr_query_useraliases(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- POLICY_HND *dom_pol, uint32 num_sids,
- DOM_SID2 *sid,
- uint32 *num_aliases, uint32 **als_rids)
-{
- prs_struct qbuf, rbuf;
- SAMR_Q_QUERY_USERALIASES q;
- SAMR_R_QUERY_USERALIASES r;
- NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- int i;
- uint32 *sid_ptrs;
-
- DEBUG(10,("cli_samr_query_useraliases\n"));
-
- ZERO_STRUCT(q);
- ZERO_STRUCT(r);
-
- if (num_sids) {
- sid_ptrs = TALLOC_ARRAY(mem_ctx, uint32, num_sids);
- if (sid_ptrs == NULL)
- return NT_STATUS_NO_MEMORY;
- } else {
- sid_ptrs = NULL;
- }
-
- for (i=0; i<num_sids; i++)
- sid_ptrs[i] = 1;
-
- /* Marshall data and send request */
-
- init_samr_q_query_useraliases(&q, dom_pol, num_sids, sid_ptrs, sid);
-
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_USERALIASES,
- q, r,
- qbuf, rbuf,
- samr_io_q_query_useraliases,
- samr_io_r_query_useraliases,
- NT_STATUS_UNSUCCESSFUL);
-
- /* Return output parameters */
-
- if (NT_STATUS_IS_OK(result = r.status)) {
- *num_aliases = r.num_entries;
- *als_rids = r.rid;
- }
-
- return result;
-}
-
/**
* Enumerate domain users
*
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 821fee7d4c..1022189f4c 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -2998,185 +2998,6 @@ bool samr_io_r_set_aliasinfo(const char *desc, SAMR_R_SET_ALIASINFO * r_u,
}
/*******************************************************************
-inits a SAMR_Q_QUERY_USERALIASES structure.
-********************************************************************/
-
-void init_samr_q_query_useraliases(SAMR_Q_QUERY_USERALIASES * q_u,
- POLICY_HND *hnd,
- uint32 num_sids,
- uint32 *ptr_sid, DOM_SID2 * sid)
-{
- DEBUG(5, ("init_samr_q_query_useraliases\n"));
-
- q_u->pol = *hnd;
-
- q_u->num_sids1 = num_sids;
- q_u->ptr = 1;
- q_u->num_sids2 = num_sids;
-
- q_u->ptr_sid = ptr_sid;
- q_u->sid = sid;
-}
-
-/*******************************************************************
-reads or writes a SAMR_Q_QUERY_USERALIASES structure.
-********************************************************************/
-
-bool samr_io_q_query_useraliases(const char *desc, SAMR_Q_QUERY_USERALIASES * q_u,
- prs_struct *ps, int depth)
-{
- fstring tmp;
- uint32 i;
-
- if (q_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_q_query_useraliases");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("pol", &q_u->pol, ps, depth))
- return False;
-
- if(!prs_uint32("num_sids1", ps, depth, &q_u->num_sids1))
- return False;
- if(!prs_uint32("ptr ", ps, depth, &q_u->ptr))
- return False;
-
- if (q_u->ptr==0)
- return True;
-
- if(!prs_uint32("num_sids2", ps, depth, &q_u->num_sids2))
- return False;
-
- if (UNMARSHALLING(ps) && (q_u->num_sids2 != 0)) {
- q_u->ptr_sid = PRS_ALLOC_MEM(ps,uint32,q_u->num_sids2);
- if (q_u->ptr_sid == NULL)
- return False;
-
- q_u->sid = PRS_ALLOC_MEM(ps, DOM_SID2, q_u->num_sids2);
- if (q_u->sid == NULL)
- return False;
- }
-
- for (i = 0; i < q_u->num_sids2; i++) {
- slprintf(tmp, sizeof(tmp) - 1, "ptr[%02d]", i);
- if(!prs_uint32(tmp, ps, depth, &q_u->ptr_sid[i]))
- return False;
- }
-
- for (i = 0; i < q_u->num_sids2; i++) {
- if (q_u->ptr_sid[i] != 0) {
- slprintf(tmp, sizeof(tmp) - 1, "sid[%02d]", i);
- if(!smb_io_dom_sid2(tmp, &q_u->sid[i], ps, depth))
- return False;
- }
- }
-
- return True;
-}
-
-/*******************************************************************
-inits a SAMR_R_QUERY_USERALIASES structure.
-********************************************************************/
-
-void init_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES * r_u,
- uint32 num_rids, uint32 *rid,
- NTSTATUS status)
-{
- DEBUG(5, ("init_samr_r_query_useraliases\n"));
-
- if (NT_STATUS_IS_OK(status)) {
- r_u->num_entries = num_rids;
- r_u->ptr = 1;
- r_u->num_entries2 = num_rids;
-
- r_u->rid = rid;
- } else {
- r_u->num_entries = 0;
- r_u->ptr = 0;
- r_u->num_entries2 = 0;
- }
-
- r_u->status = status;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_rids(const char *desc, uint32 *num_rids, uint32 **rid,
- prs_struct *ps, int depth)
-{
- fstring tmp;
- uint32 i;
- if (rid == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_rids");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("num_rids", ps, depth, num_rids))
- return False;
-
- if ((*num_rids) != 0) {
- if (UNMARSHALLING(ps)) {
- /* reading */
- (*rid) = PRS_ALLOC_MEM(ps,uint32, *num_rids);
- }
- if ((*rid) == NULL)
- return False;
-
- for (i = 0; i < (*num_rids); i++) {
- slprintf(tmp, sizeof(tmp) - 1, "rid[%02d]", i);
- if(!prs_uint32(tmp, ps, depth, &((*rid)[i])))
- return False;
- }
- }
-
- return True;
-}
-
-/*******************************************************************
-reads or writes a structure.
-********************************************************************/
-
-bool samr_io_r_query_useraliases(const char *desc, SAMR_R_QUERY_USERALIASES * r_u,
- prs_struct *ps, int depth)
-{
- if (r_u == NULL)
- return False;
-
- prs_debug(ps, depth, desc, "samr_io_r_query_useraliases");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("num_entries", ps, depth, &r_u->num_entries))
- return False;
- if(!prs_uint32("ptr ", ps, depth, &r_u->ptr))
- return False;
-
- if (r_u->ptr != 0) {
- if(!samr_io_rids("rids", &r_u->num_entries2, &r_u->rid, 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_LOOKUP_RIDS structure.
********************************************************************/