summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-06-02 14:25:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:52 -0500
commit47af5445f39202b91e29bce0fff8933e56063789 (patch)
tree9a8af8fd32bdc6549d83d13fa2a7ff489359927d /source3/rpc_parse
parentefc96df3d5b415ca9c19527a44d0619992712b6d (diff)
downloadsamba-47af5445f39202b91e29bce0fff8933e56063789.tar.gz
samba-47af5445f39202b91e29bce0fff8933e56063789.tar.bz2
samba-47af5445f39202b91e29bce0fff8933e56063789.zip
r977: Implement 'net rpc group rename' -- rename domain groups.
Volker (This used to be commit 9ceff803278bdbc09cb5ab678a108cea24ab49a9)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_samr.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 85eedc7baa..e6d7e847ad 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/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;