1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

So the samr_io_userinfo_ctr was requiring a SAM_USERINFO_CTR to be passed

in as well as tallocating space for one itself.  I've deleted code so the
passed in container is used to store the SAM user info.  This may have
broken some server side SAM stuff which probably isn't used anyway.  )-:
(This used to be commit fc44cec0de)
This commit is contained in:
Tim Potter 2001-05-09 05:05:01 +00:00
parent dcc39ea439
commit 989ece4b26

View File

@ -5745,15 +5745,20 @@ void init_samr_userinfo_ctr(SAM_USERINFO_CTR * ctr, uchar * sess_key,
reads or writes a structure.
********************************************************************/
static BOOL samr_io_userinfo_ctr(char *desc, SAM_USERINFO_CTR **ppctr,
static BOOL samr_io_userinfo_ctr(char *desc, SAM_USERINFO_CTR *ctr,
prs_struct *ps, int depth)
{
BOOL ret;
SAM_USERINFO_CTR *ctr;
prs_debug(ps, depth, desc, "samr_io_userinfo_ctr");
depth++;
#if 0
/* I think this is broken as the caller should pass in a
sam_userinfo_ctr not have it allocated. This may break some of
the setuser calls so this is a clue to the person who may be
trying to debug the problem. (-: -tpot */
if (UNMARSHALLING(ps)) {
ctr = (SAM_USERINFO_CTR *)prs_alloc_mem(ps,sizeof(SAM_USERINFO_CTR));
if (ctr == NULL)
@ -5762,6 +5767,7 @@ static BOOL samr_io_userinfo_ctr(char *desc, SAM_USERINFO_CTR **ppctr,
} else {
ctr = *ppctr;
}
#endif
/* lkclXXXX DO NOT ALIGN BEFORE READING SWITCH VALUE! */
@ -5881,7 +5887,7 @@ BOOL samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO * r_u,
return False;
if (r_u->ptr != 0) {
if(!samr_io_userinfo_ctr("ctr", &r_u->ctr, ps, depth))
if(!samr_io_userinfo_ctr("ctr", r_u->ctr, ps, depth))
return False;
}
@ -5928,7 +5934,7 @@ BOOL samr_io_q_set_userinfo(char *desc, SAMR_Q_SET_USERINFO * q_u,
if(!prs_uint16("switch_value", ps, depth, &q_u->switch_value))
return False;
if(!samr_io_userinfo_ctr("ctr", &q_u->ctr, ps, depth))
if(!samr_io_userinfo_ctr("ctr", q_u->ctr, ps, depth))
return False;
return True;
@ -6016,7 +6022,7 @@ BOOL samr_io_q_set_userinfo2(char *desc, SAMR_Q_SET_USERINFO2 * q_u,
if(!prs_uint16("switch_value", ps, depth, &q_u->switch_value))
return False;
if(!samr_io_userinfo_ctr("ctr", &q_u->ctr, ps, depth))
if(!samr_io_userinfo_ctr("ctr", q_u->ctr, ps, depth))
return False;
return True;