mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Remove unused marshalling for SAMR_QUERY_USERINFO.
Guenther (This used to be commit daec00fd62999d4f8d74dc4cdd2fba686433ad01)
This commit is contained in:
parent
b1c6104fa4
commit
6f2a384b33
@ -587,25 +587,6 @@ typedef struct r_samr_set_user_info
|
||||
} SAMR_R_SET_USERINFO;
|
||||
|
||||
|
||||
/* SAMR_Q_QUERY_USERINFO - probably a get sam info */
|
||||
typedef struct q_samr_query_user_info
|
||||
{
|
||||
POLICY_HND pol; /* policy handle associated with unknown id */
|
||||
uint16 switch_value; /* 0x0015, 0x0011 or 0x0010 - 16 bit unknown */
|
||||
|
||||
} SAMR_Q_QUERY_USERINFO;
|
||||
|
||||
/* SAMR_R_QUERY_USERINFO - probably a get sam info */
|
||||
typedef struct r_samr_query_user_info
|
||||
{
|
||||
uint32 ptr; /* pointer */
|
||||
SAM_USERINFO_CTR *ctr;
|
||||
|
||||
NTSTATUS status; /* return status */
|
||||
|
||||
} SAMR_R_QUERY_USERINFO;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
SAMR_Q_LOOKUP_RIDS - do a conversion from RID groups to something.
|
||||
|
||||
|
@ -27,43 +27,6 @@ static void init_lsa_String(struct lsa_String *name, const char *s)
|
||||
name->string = s;
|
||||
}
|
||||
|
||||
/* Query user info */
|
||||
|
||||
NTSTATUS rpccli_samr_query_userinfo(struct rpc_pipe_client *cli,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
const POLICY_HND *user_pol,
|
||||
uint16 switch_value,
|
||||
SAM_USERINFO_CTR **ctr)
|
||||
{
|
||||
prs_struct qbuf, rbuf;
|
||||
SAMR_Q_QUERY_USERINFO q;
|
||||
SAMR_R_QUERY_USERINFO r;
|
||||
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
|
||||
|
||||
DEBUG(10,("cli_samr_query_userinfo\n"));
|
||||
|
||||
ZERO_STRUCT(q);
|
||||
ZERO_STRUCT(r);
|
||||
|
||||
/* Marshall data and send request */
|
||||
|
||||
init_samr_q_query_userinfo(&q, user_pol, switch_value);
|
||||
|
||||
CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_QUERY_USERINFO,
|
||||
q, r,
|
||||
qbuf, rbuf,
|
||||
samr_io_q_query_userinfo,
|
||||
samr_io_r_query_userinfo,
|
||||
NT_STATUS_UNSUCCESSFUL);
|
||||
|
||||
/* Return output parameters */
|
||||
|
||||
result = r.status;
|
||||
*ctr = r.ctr;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Enumerate domain groups */
|
||||
|
||||
NTSTATUS rpccli_samr_enum_dom_groups(struct rpc_pipe_client *cli,
|
||||
|
@ -530,44 +530,6 @@ bool samr_io_r_lookup_rids(const char *desc, SAMR_R_LOOKUP_RIDS * r_u,
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
inits a SAMR_Q_QUERY_USERINFO structure.
|
||||
********************************************************************/
|
||||
|
||||
void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO * q_u,
|
||||
const POLICY_HND *hnd, uint16 switch_value)
|
||||
{
|
||||
DEBUG(5, ("init_samr_q_query_userinfo\n"));
|
||||
|
||||
q_u->pol = *hnd;
|
||||
q_u->switch_value = switch_value;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
reads or writes a structure.
|
||||
********************************************************************/
|
||||
|
||||
bool samr_io_q_query_userinfo(const char *desc, SAMR_Q_QUERY_USERINFO * q_u,
|
||||
prs_struct *ps, int depth)
|
||||
{
|
||||
if (q_u == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "samr_io_q_query_userinfo");
|
||||
depth++;
|
||||
|
||||
if(!prs_align(ps))
|
||||
return False;
|
||||
|
||||
if(!smb_io_pol_hnd("pol", &q_u->pol, ps, depth))
|
||||
return False;
|
||||
|
||||
if(!prs_uint16("switch_value", ps, depth, &q_u->switch_value)) /* 0x0015 or 0x0011 */
|
||||
return False;
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
reads or writes a LOGON_HRS structure.
|
||||
********************************************************************/
|
||||
@ -2082,58 +2044,6 @@ static bool samr_io_userinfo_ctr(const char *desc, SAM_USERINFO_CTR **ppctr,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
inits a SAMR_R_QUERY_USERINFO structure.
|
||||
********************************************************************/
|
||||
|
||||
void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO * r_u,
|
||||
SAM_USERINFO_CTR * ctr, NTSTATUS status)
|
||||
{
|
||||
DEBUG(5, ("init_samr_r_query_userinfo\n"));
|
||||
|
||||
r_u->ptr = 0;
|
||||
r_u->ctr = NULL;
|
||||
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
r_u->ptr = 1;
|
||||
r_u->ctr = ctr;
|
||||
}
|
||||
|
||||
r_u->status = status; /* return status */
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
reads or writes a structure.
|
||||
********************************************************************/
|
||||
|
||||
bool samr_io_r_query_userinfo(const char *desc, SAMR_R_QUERY_USERINFO * r_u,
|
||||
prs_struct *ps, int depth)
|
||||
{
|
||||
if (r_u == NULL)
|
||||
return False;
|
||||
|
||||
prs_debug(ps, depth, desc, "samr_io_r_query_userinfo");
|
||||
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_io_userinfo_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_SET_USERINFO structure.
|
||||
********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user