[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Fri Jul 17 17:07:04 UTC 2015


The branch, master has been updated
       via  323e4f8 s3:winbindd: initialize dst->primary_gid with (gid_t)-1
       via  a7d5829 s3:winbindd: initialize acct_desc fields in rpc_enum_{dom,local}_groups()
       via  e5d309d s3:winbindd: initialize an [in,out] variable in rpc_try_lookup_sids3()
      from  109ff38 s3-auth: Fix a possible null pointer dereference

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


- Log -----------------------------------------------------------------
commit 323e4f89fca2f4f0e017a36a27427be32b42fc54
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 16 07:12:07 2015 +0200

    s3:winbindd: initialize dst->primary_gid with (gid_t)-1
    
    We should not leave this uninitialized.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Fri Jul 17 19:06:08 CEST 2015 on sn-devel-104

commit a7d582954d0de6bae0288a239eb42c23a053f495
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 16 07:00:08 2015 +0200

    s3:winbindd: initialize acct_desc fields in rpc_enum_{dom,local}_groups()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit e5d309d4328a1391ebd39dd487c100abdb9cb091
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Jul 16 06:57:50 2015 +0200

    s3:winbindd: initialize an [in,out] variable in rpc_try_lookup_sids3()
    
    The input value of count is ignored by the server,
    but we should not send an uninitialized value.
    
    Found by valgrind.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 source3/winbindd/winbindd_rpc.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index 03bc9b5..386396a 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -120,7 +120,7 @@ NTSTATUS rpc_query_user_list(TALLOC_CTX *mem_ctx,
 
 			dst->homedir = NULL;
 			dst->shell = NULL;
-
+			dst->primary_gid = (gid_t)-1;
 			sid_compose(&dst->user_sid, domain_sid, rid);
 
 			/* For the moment we set the primary group for
@@ -190,10 +190,12 @@ NTSTATUS rpc_enum_dom_groups(TALLOC_CTX *mem_ctx,
 		}
 
 		for (g = 0; g < count; g++) {
-			fstrcpy(info[num_info + g].acct_name,
-				sam_array->entries[g].name.string);
+			struct wb_acct_info *i = &info[num_info + g];
 
-			info[num_info + g].rid = sam_array->entries[g].idx;
+			fstrcpy(i->acct_name,
+				sam_array->entries[g].name.string);
+			fstrcpy(i->acct_desc, "");
+			i->rid = sam_array->entries[g].idx;
 		}
 
 		num_info += count;
@@ -250,9 +252,12 @@ NTSTATUS rpc_enum_local_groups(TALLOC_CTX *mem_ctx,
 		}
 
 		for (g = 0; g < count; g++) {
-			fstrcpy(info[num_info + g].acct_name,
+			struct wb_acct_info *i = &info[num_info + g];
+
+			fstrcpy(i->acct_name,
 				sam_array->entries[g].name.string);
-			info[num_info + g].rid = sam_array->entries[g].idx;
+			fstrcpy(i->acct_desc, "");
+			i->rid = sam_array->entries[g].idx;
 		}
 
 		num_info += count;
@@ -1081,7 +1086,7 @@ static NTSTATUS rpc_try_lookup_sids3(TALLOC_CTX *mem_ctx,
 {
 	struct lsa_TransNameArray2 lsa_names2;
 	struct lsa_TransNameArray *names = *pnames;
-	uint32_t i, count;
+	uint32_t i, count = 0;
 	NTSTATUS status, result;
 
 	ZERO_STRUCT(lsa_names2);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list