summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-08-22 01:18:48 +0000
committerGerald Carter <jerry@samba.org>2001-08-22 01:18:48 +0000
commit3ec862e6dbf1be85367856d02949b208cd5cc6cd (patch)
tree9dad605c67146619335aa617281d46f931dc67fe /source3/rpc_parse
parentecea36501ec6d4d2db0c27311d4548e8e404ec1a (diff)
downloadsamba-3ec862e6dbf1be85367856d02949b208cd5cc6cd.tar.gz
samba-3ec862e6dbf1be85367856d02949b208cd5cc6cd.tar.bz2
samba-3ec862e6dbf1be85367856d02949b208cd5cc6cd.zip
merge from 2.2
(This used to be commit fe4ffa8dda165b0d1197f022f59db0a284cbef79)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_net.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 7bc277247d..e8f0c02a52 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -1261,7 +1261,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr, SAM_ACCOUNT *sam
usr->user_id = pdb_get_user_rid(sampw);
usr->group_id = pdb_get_group_rid(sampw);
- usr->num_groups = num_groups;
+ usr->num_groups = num_groups+1;
usr->buffer_groups = 1; /* indicates fill in groups, below, even if there are none */
usr->user_flgs = user_flgs;
@@ -1289,16 +1289,21 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr, SAM_ACCOUNT *sam
init_unistr2(&usr->uni_home_dir, home_dir, len_home_dir);
init_unistr2(&usr->uni_dir_drive, dir_drive, len_dir_drive);
- usr->num_groups2 = num_groups;
+ /* always have at least one group == the user's primary group */
+ usr->num_groups2 = num_groups+1;
- if (num_groups > 0) {
- usr->gids = (DOM_GID *)talloc_zero(ctx,sizeof(DOM_GID) * num_groups);
- if (usr->gids == NULL)
- return;
- for (i = 0; i < num_groups; i++)
- usr->gids[i] = gids[i];
- }
+ usr->gids = (DOM_GID *)talloc_zero(ctx,sizeof(DOM_GID) * (num_groups+1));
+ if (usr->gids == NULL)
+ return;
+ /* primary group **MUST** go first. NT4's winmsd.exe will give
+ "The Network statistics are currently not available. 9-5"
+ What the heck is this? -- jerry */
+ usr->gids[0].g_rid = usr->group_id;
+ usr->gids[0].attr = 0x07;
+ for (i = 0; i < num_groups; i++)
+ usr->gids[i+1] = gids[i];
+
init_unistr2(&usr->uni_logon_srv, logon_srv, len_logon_srv);
init_unistr2(&usr->uni_logon_dom, logon_dom, len_logon_dom);