summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-09 17:19:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:22 -0500
commit3b469083befa7159b700d5465db04b1be2d4ac5f (patch)
tree1de890f5c5add0f9c8ea29fe16afcf42d0607e60 /source3/rpc_parse
parent38060f70a561ee9b71038bf5909b6fdf4872c4c4 (diff)
downloadsamba-3b469083befa7159b700d5465db04b1be2d4ac5f.tar.gz
samba-3b469083befa7159b700d5465db04b1be2d4ac5f.tar.bz2
samba-3b469083befa7159b700d5465db04b1be2d4ac5f.zip
r16126: Janitor for Volker..... This looks correct to me.
Jeremy. Fix a parsing error that became apparent in 'make test': If we have no group rids in the info3 we set the array buffer pointer to "1" but fail to actually ship the array. Volker. (This used to be commit ee1b9207d3119c2b3e7c1c4e59250dbd323eae6a)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_net.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index e168f5abbd..cecec31410 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -4,7 +4,7 @@
* Copyright (C) Andrew Tridgell 1992-1997,
* Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
* Copyright (C) Paul Ashton 1997.
- * Copyright (C) Jean François Micouleau 2002.
+ * Copyright (C) Jean Francois Micouleau 2002.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1711,29 +1711,24 @@ BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
if(!prs_align(ps))
return False;
- if (usr->num_groups > 0) {
+ if(!prs_uint32("num_groups2 ", ps, depth, &usr->num_groups2)) /* num groups2 */
+ return False;
- if(!prs_uint32("num_groups2 ", ps, depth, &usr->num_groups2)) /* num groups2 */
- return False;
+ if (usr->num_groups != usr->num_groups2) {
+ DEBUG(3,("net_io_user_info3: num_groups mismatch! (%d != %d)\n",
+ usr->num_groups, usr->num_groups2));
+ return False;
+ }
- if (usr->num_groups != usr->num_groups2) {
- DEBUG(3,("net_io_user_info3: num_groups mismatch! (%d != %d)\n",
- usr->num_groups, usr->num_groups2));
+ if (UNMARSHALLING(ps)) {
+ usr->gids = PRS_ALLOC_MEM(ps, DOM_GID, usr->num_groups);
+ if (usr->gids == NULL)
return False;
- }
-
-
- if (UNMARSHALLING(ps)) {
- usr->gids = PRS_ALLOC_MEM(ps, DOM_GID, usr->num_groups);
- if (usr->gids == NULL)
- return False;
- }
+ }
- for (i = 0; i < usr->num_groups; i++) {
- if(!smb_io_gid("", &usr->gids[i], ps, depth)) /* group info */
- return False;
- }
-
+ for (i = 0; i < usr->num_groups; i++) {
+ if(!smb_io_gid("", &usr->gids[i], ps, depth)) /* group info */
+ return False;
}
if(!smb_io_unistr2("uni_logon_srv", &usr->uni_logon_srv, usr->hdr_logon_srv.buffer, ps, depth)) /* logon server unicode string */