summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_samr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse/parse_samr.c')
-rw-r--r--source3/rpc_parse/parse_samr.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 0d60880615..6479b07048 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -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;