- for (j = 0; j < num_dom_users; i++, j++) {
- uint32_t rid = disp_info.info1.entries[j].rid;
- struct samr_DispEntryGeneral *src;
- struct wbint_userinfo *dst;
-
- src = &(disp_info.info1.entries[j]);
- dst = &(info[i]);
-
- dst->acct_name = talloc_strdup(info,
- src->account_name.string);
- if (dst->acct_name == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto error;
- }
-
- dst->full_name = talloc_strdup(info, src->full_name.string);
- if (dst->full_name == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto error;
- }
-
- dst->homedir = NULL;
- dst->shell = NULL;
-
- sid_compose(&dst->user_sid, &domain->sid, rid);
-
- /* For the moment we set the primary group for
- every user to be the Domain Users group.
- There are serious problems with determining
- the actual primary group for large domains.
- This should really be made into a 'winbind
- force group' smb.conf parameter or
- something like that. */
- sid_compose(&dst->group_sid, &domain->sid,
- DOMAIN_RID_USERS);
- }
- } while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));