1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

merge from 2.2

(This used to be commit fe4ffa8dda165b0d1197f022f59db0a284cbef79)
This commit is contained in:
Gerald Carter 2001-08-22 01:18:48 +00:00
parent ecea36501e
commit 3ec862e6db

View File

@ -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);