summaryrefslogtreecommitdiff
path: root/source/rpc_parse/parse_samr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/rpc_parse/parse_samr.c')
-rw-r--r--source/rpc_parse/parse_samr.c49
1 files changed, 47 insertions, 2 deletions
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index 85eedc7baab..bb4c94404b0 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -2204,12 +2204,17 @@ reads or writes a structure.
BOOL samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1,
prs_struct *ps, int depth)
{
+ uint16 dummy = 1;
+
if (gr1 == NULL)
return False;
prs_debug(ps, depth, desc, "samr_io_group_info1");
depth++;
+ if(!prs_uint16("level", ps, depth, &dummy))
+ return False;
+
if(!prs_align(ps))
return False;
@@ -2236,6 +2241,43 @@ BOOL samr_io_group_info1(const char *desc, GROUP_INFO1 * gr1,
}
/*******************************************************************
+inits a GROUP_INFO2 structure.
+********************************************************************/
+
+void init_samr_group_info2(GROUP_INFO2 * gr2, const char *acct_name)
+{
+ DEBUG(5, ("init_samr_group_info2\n"));
+
+ gr2->level = 2;
+ init_unistr2(&gr2->uni_acct_name, acct_name, UNI_FLAGS_NONE);
+ init_uni_hdr(&gr2->hdr_acct_name, &gr2->uni_acct_name);
+}
+
+/*******************************************************************
+reads or writes a structure.
+********************************************************************/
+
+BOOL samr_io_group_info2(const char *desc, GROUP_INFO2 *gr2, prs_struct *ps, int depth)
+{
+ if (gr2 == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "samr_io_group_info2");
+ depth++;
+
+ if(!prs_uint16("hdr_level", ps, depth, &gr2->level))
+ return False;
+
+ if(!smb_io_unihdr("hdr_acct_name", &gr2->hdr_acct_name, ps, depth))
+ return False;
+ if(!smb_io_unistr2("uni_acct_name", &gr2->uni_acct_name,
+ gr2->hdr_acct_name.buffer, ps, depth))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
inits a GROUP_INFO3 structure.
********************************************************************/
@@ -2328,6 +2370,10 @@ static BOOL samr_group_info_ctr(const char *desc, GROUP_INFO_CTR **ctr,
if(!samr_io_group_info1("group_info1", &(*ctr)->group.info1, ps, depth))
return False;
break;
+ case 2:
+ if(!samr_io_group_info2("group_info2", &(*ctr)->group.info2, ps, depth))
+ return False;
+ break;
case 3:
if(!samr_io_group_info3("group_info3", &(*ctr)->group.info3, ps, depth))
return False;
@@ -6924,8 +6970,7 @@ BOOL samr_io_r_get_dom_pwinfo(const char *desc, SAMR_R_GET_DOM_PWINFO * r_u,
return False;
/*
- * We need 16 bytes here according to tests. Don't know
- * what they are, but the length is important for the singing
+ * see the Samba4 IDL for what these actually are.
*/
if(!prs_uint16("unk_0", ps, depth, &r_u->unk_0))