summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2001-05-08 16:33:18 +0000
committerJean-François Micouleau <jfm@samba.org>2001-05-08 16:33:18 +0000
commitb6a6b4b02ef923ce71a8be8258ccee1cbb439c6f (patch)
tree4adc6c0fce3385d225493b43a544e12c43a5fd46 /source3/rpc_parse
parentacc0ca79a0d95160c2bcca40957b7d09c236c516 (diff)
downloadsamba-b6a6b4b02ef923ce71a8be8258ccee1cbb439c6f.tar.gz
samba-b6a6b4b02ef923ce71a8be8258ccee1cbb439c6f.tar.bz2
samba-b6a6b4b02ef923ce71a8be8258ccee1cbb439c6f.zip
fixes to the group mapping code.
Not ready yet. J.F. (This used to be commit 62a7a567fdea230b77cc97a3f74d868542c34700)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_samr.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 03226d522f..0d60880615 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -2047,29 +2047,32 @@ BOOL samr_io_group_info4(char *desc, GROUP_INFO4 * gr4,
reads or writes a structure.
********************************************************************/
-static BOOL samr_group_info_ctr(char *desc, GROUP_INFO_CTR * ctr,
+static BOOL samr_group_info_ctr(char *desc, GROUP_INFO_CTR **ctr,
prs_struct *ps, int depth)
{
- if (ctr == NULL)
+ if (UNMARSHALLING(ps))
+ *ctr = (GROUP_INFO_CTR *)prs_alloc_mem(ps,sizeof(GROUP_INFO_CTR));
+
+ if (*ctr == NULL)
return False;
prs_debug(ps, depth, desc, "samr_group_info_ctr");
depth++;
- if(!prs_uint16("switch_value1", ps, depth, &ctr->switch_value1))
+ if(!prs_uint16("switch_value1", ps, depth, &(*ctr)->switch_value1))
return False;
- if(!prs_uint16("switch_value2", ps, depth, &ctr->switch_value2))
+ if(!prs_uint16("switch_value2", ps, depth, &(*ctr)->switch_value2))
return False;
- switch (ctr->switch_value1) {
+ switch ((*ctr)->switch_value1) {
case 1:
if(!samr_io_group_info1("group_info1",
- &ctr->group.info1, ps, depth))
+ &(*ctr)->group.info1, ps, depth))
return False;
break;
case 4:
if(!samr_io_group_info4("group_info4",
- &ctr->group.info4, ps, depth))
+ &(*ctr)->group.info4, ps, depth))
return False;
break;
default:
@@ -2395,7 +2398,7 @@ BOOL samr_io_q_set_groupinfo(char *desc, SAMR_Q_SET_GROUPINFO * q_e,
if(!smb_io_pol_hnd("pol", &q_e->pol, ps, depth))
return False;
- if(!samr_group_info_ctr("ctr", q_e->ctr, ps, depth))
+ if(!samr_group_info_ctr("ctr", &q_e->ctr, ps, depth))
return False;
return True;
@@ -2507,7 +2510,7 @@ BOOL samr_io_r_query_groupinfo(char *desc, SAMR_R_QUERY_GROUPINFO * r_u,
return False;
if (r_u->ptr != 0) {
- if(!samr_group_info_ctr("ctr", r_u->ctr, ps, depth))
+ if(!samr_group_info_ctr("ctr", &r_u->ctr, ps, depth))
return False;
}