1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-14 12:23:52 +03:00

Remove unused marshalling for SAMR_QUERY_USERALIASES.

Guenther
This commit is contained in:
Günther Deschner
2008-02-05 11:17:45 +01:00
parent 48e74f7752
commit fc55433aee
3 changed files with 0 additions and 267 deletions

View File

@@ -2997,185 +2997,6 @@ bool samr_io_r_set_aliasinfo(const char *desc, SAMR_R_SET_ALIASINFO * r_u,
return True;
}
/*******************************************************************
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.
********************************************************************/