diff options
author | Gerald Carter <jerry@samba.org> | 2001-08-21 03:51:34 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2001-08-21 03:51:34 +0000 |
commit | 0c253792887f477907bbb25e4f7f2076e409cfdb (patch) | |
tree | 954fb95c058d3f5679c6e96e82db68f68b91d737 | |
parent | dfed52253c2d64533b46924d82e1d38a60310e59 (diff) | |
download | samba-0c253792887f477907bbb25e4f7f2076e409cfdb.tar.gz samba-0c253792887f477907bbb25e4f7f2076e409cfdb.tar.xz samba-0c253792887f477907bbb25e4f7f2076e409cfdb.zip |
NT4 requires that the primary group also be included
**first** in the list of groups later in the NET_USER_INFO_3
struct passed back from net_samlogon()
jerry
-rw-r--r-- | source/rpc_parse/parse_net.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/source/rpc_parse/parse_net.c b/source/rpc_parse/parse_net.c index d7253a53fd4..38fcb897206 100644 --- a/source/rpc_parse/parse_net.c +++ b/source/rpc_parse/parse_net.c @@ -1289,15 +1289,20 @@ 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; - - 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]; - } + /* always have at least one group == the user's primary group */ + usr->num_groups2 = num_groups+1; + + 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); |