summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-09 05:05:01 +0000
committerTim Potter <tpot@samba.org>2001-05-09 05:05:01 +0000
commit989ece4b265d7ea8379aa9c1899c59aadf8bd120 (patch)
tree4e0678c76b1e4563c682363bd36b0bf6b9b0f1f3 /source3
parentdcc39ea43984fe9f9c683e48423794793a923e28 (diff)
downloadsamba-989ece4b265d7ea8379aa9c1899c59aadf8bd120.tar.gz
samba-989ece4b265d7ea8379aa9c1899c59aadf8bd120.tar.bz2
samba-989ece4b265d7ea8379aa9c1899c59aadf8bd120.zip
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 fc44cec0de68c92001c4313b4f0ee9f69ba6b9b5)
Diffstat (limited to 'source3')
-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;