[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Fri Jun 11 07:11:52 MDT 2010


The branch, master has been updated
       via  4bb351a... s3-auth: Fix valgrind warning (unitialized var) in samu_to_SamInfo3().
      from  a9b06f5... configure.in prevent generation of file "shlib.so"

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


- Log -----------------------------------------------------------------
commit 4bb351ac8080c92ff6a84a5cdeca0b158864da1b
Author: Günther Deschner <gd at samba.org>
Date:   Fri Jun 11 15:05:36 2010 +0200

    s3-auth: Fix valgrind warning (unitialized var) in samu_to_SamInfo3().
    
    Guenther
    
    s3:auth do not fail if there are 0 group sids
    
    Signed-off-by: Günther Deschner <gd at samba.org>

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

Summary of changes:
 source3/auth/server_info.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c
index 1ef2724..a43c4f9 100644
--- a/source3/auth/server_info.c
+++ b/source3/auth/server_info.c
@@ -308,7 +308,7 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
 	const struct dom_sid *group_sid;
 	struct dom_sid domain_sid;
 	struct dom_sid *group_sids;
-	size_t num_group_sids;
+	size_t num_group_sids = 0;
 	const char *tmp;
 	gid_t *gids;
 	NTSTATUS status;
@@ -441,10 +441,12 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
 		return status;
 	}
 
-	status = group_sids_to_info3(info3, group_sids, num_group_sids);
-	if (!NT_STATUS_IS_OK(status)) {
-		TALLOC_FREE(info3);
-		return status;
+	if (num_group_sids) {
+		status = group_sids_to_info3(info3, group_sids, num_group_sids);
+		if (!NT_STATUS_IS_OK(status)) {
+			TALLOC_FREE(info3);
+			return status;
+		}
 	}
 
 	/* We don't need sids and gids after the conversion */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list