[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-1006-ga4aa38f

Volker Lendecke vlendec at samba.org
Tue Oct 6 13:33:58 MDT 2009


The branch, master has been updated
       via  a4aa38f8b927d6713c4cdd921a0a27cded041e94 (commit)
      from  8536e1b947ad8a2bc5596a9a1de9a58262153ebf (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a4aa38f8b927d6713c4cdd921a0a27cded041e94
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Oct 6 21:31:02 2009 +0200

    s3:winbind: Make query_user_list in winbindd_rpc a bit more readable

-----------------------------------------------------------------------

Summary of changes:
 source3/winbindd/winbindd_rpc.c |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index ac5c3d2..ce437f7 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);
 		}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list