From a02415bf363e3c1b6863b135bdae3b2e2708db3b Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Sat, 14 Jan 2006 12:37:25 +0000 Subject: r12935: After discussion with Volker fix bug #3397 using a variant of the patch by Alex Deiter (tiamat@komi.mts.ru). Introduces level 9 of getuserinfo and allows to successfully install MS SMS2003 on a member of a Samba domain. Also added support for this level in rpcclient. The code for infolevel 9 is modelled upon Samba-TNG by Alex Deiter. Jerry, we need this in 3.0.21b. (This used to be commit 93461646ce2ad6e2f8b11d40ce98722d56a83b43) --- source3/rpc_parse/parse_samr.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'source3/rpc_parse/parse_samr.c') diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 0a055ff826..6c2b4f4ea7 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -5182,6 +5182,39 @@ static BOOL sam_io_user_info7(const char *desc, SAM_USER_INFO_7 * usr, return True; } +/******************************************************************* +inits a SAM_USER_INFO_9 structure. +********************************************************************/ + +void init_sam_user_info9(SAM_USER_INFO_9 * usr, uint32 rid_group) +{ + DEBUG(5, ("init_sam_user_info9\n")); + + usr->rid_group = rid_group; +} + +/******************************************************************* +reads or writes a structure. +********************************************************************/ + +static BOOL sam_io_user_info9(const char *desc, SAM_USER_INFO_9 * usr, + prs_struct *ps, int depth) +{ + if (usr == NULL) + return False; + + prs_debug(ps, depth, desc, "samr_io_r_user_info9"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("rid_group", ps, depth, &usr->rid_group)) + return False; + + return True; +} + /******************************************************************* inits a SAM_USER_INFO_16 structure. ********************************************************************/ @@ -6354,6 +6387,15 @@ static BOOL samr_io_userinfo_ctr(const char *desc, SAM_USERINFO_CTR **ppctr, } ret = sam_io_user_info7("", ctr->info.id7, ps, depth); break; + case 9: + if (UNMARSHALLING(ps)) + ctr->info.id9 = PRS_ALLOC_MEM(ps,SAM_USER_INFO_9,1); + if (ctr->info.id9 == NULL) { + DEBUG(2,("samr_io_userinfo_ctr: info pointer not initialised\n")); + return False; + } + ret = sam_io_user_info9("", ctr->info.id9, ps, depth); + break; case 16: if (UNMARSHALLING(ps)) ctr->info.id16 = PRS_ALLOC_MEM(ps,SAM_USER_INFO_16,1); -- cgit