summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-10-06 21:31:02 +0200
committerVolker Lendecke <vl@samba.org>2009-10-06 21:33:20 +0200
commita4aa38f8b927d6713c4cdd921a0a27cded041e94 (patch)
tree14cbc8acf083d9382401691c703f1472ffeab2a1
parent8536e1b947ad8a2bc5596a9a1de9a58262153ebf (diff)
downloadsamba-a4aa38f8b927d6713c4cdd921a0a27cded041e94.tar.gz
samba-a4aa38f8b927d6713c4cdd921a0a27cded041e94.tar.bz2
samba-a4aa38f8b927d6713c4cdd921a0a27cded041e94.zip
s3:winbind: Make query_user_list in winbindd_rpc a bit more readable
-rw-r--r--source3/winbindd/winbindd_rpc.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index ac5c3d2d93..ce437f744c 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -99,14 +99,19 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
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;
- (*info)[i].acct_name = talloc_strdup(mem_ctx,
- disp_info.info1.entries[j].account_name.string);
- (*info)[i].full_name = talloc_strdup(mem_ctx,
- disp_info.info1.entries[j].full_name.string);
- (*info)[i].homedir = NULL;
- (*info)[i].shell = NULL;
- sid_compose(&(*info)[i].user_sid, &domain->sid, rid);
+ src = &(disp_info.info1.entries[j]);
+ dst = &((*info)[i]);
+
+ dst->acct_name = talloc_strdup(
+ mem_ctx, src->account_name.string);
+ dst->full_name = talloc_strdup(
+ mem_ctx, src->full_name.string);
+ 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.
@@ -116,7 +121,7 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain,
force group' smb.conf parameter or
something like that. */
- sid_compose(&(*info)[i].group_sid, &domain->sid,
+ sid_compose(&dst->group_sid, &domain->sid,
DOMAIN_GROUP_RID_USERS);
}