[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1712-ge9b3115

Gerald W. Carter jerry at samba.org
Tue Jan 29 22:25:32 GMT 2008


The branch, v3-2-test has been updated
       via  e9b3115c85e3d04eeaa04bfa71972d393272afca (commit)
      from  cb6531965b2baab320123d4301ab851c6e22aa58 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit e9b3115c85e3d04eeaa04bfa71972d393272afca
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jan 29 23:01:23 2008 +0100

    Fix uninitialized variables
    
    response.extra_data.data is not initialized on the first error path
    
    Found by the IBM checker

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

Summary of changes:
 source/nsswitch/libwbclient/wbc_pwd.c |   20 ++++++++++----------
 source/nsswitch/libwbclient/wbc_sid.c |   10 +++++-----
 2 files changed, 15 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nsswitch/libwbclient/wbc_pwd.c b/source/nsswitch/libwbclient/wbc_pwd.c
index b24e198..b7febcc 100644
--- a/source/nsswitch/libwbclient/wbc_pwd.c
+++ b/source/nsswitch/libwbclient/wbc_pwd.c
@@ -209,16 +209,16 @@ wbcErr wbcGetgrnam(const char *name, struct group **grp)
 	struct winbindd_request request;
 	struct winbindd_response response;
 
-	if (!name || !grp) {
-		wbc_status = WBC_ERR_INVALID_PARAM;
-		BAIL_ON_WBC_ERROR(wbc_status);
-	}
-
 	/* Initialize request */
 
 	ZERO_STRUCT(request);
 	ZERO_STRUCT(response);
 
+	if (!name || !grp) {
+		wbc_status = WBC_ERR_INVALID_PARAM;
+		BAIL_ON_WBC_ERROR(wbc_status);
+	}
+
 	/* dst is already null terminated from the memset above */
 
 	strncpy(request.data.groupname, name, sizeof(request.data.groupname)-1);
@@ -254,16 +254,16 @@ wbcErr wbcGetgrgid(gid_t gid, struct group **grp)
 	struct winbindd_request request;
 	struct winbindd_response response;
 
-	if (!grp) {
-		wbc_status = WBC_ERR_INVALID_PARAM;
-		BAIL_ON_WBC_ERROR(wbc_status);
-	}
-
 	/* Initialize request */
 
 	ZERO_STRUCT(request);
 	ZERO_STRUCT(response);
 
+	if (!grp) {
+		wbc_status = WBC_ERR_INVALID_PARAM;
+		BAIL_ON_WBC_ERROR(wbc_status);
+	}
+
 	request.data.gid = gid;
 
 	wbc_status = wbcRequestResponse(WINBINDD_GETGRGID,
diff --git a/source/nsswitch/libwbclient/wbc_sid.c b/source/nsswitch/libwbclient/wbc_sid.c
index f5f553c..0519d8b 100644
--- a/source/nsswitch/libwbclient/wbc_sid.c
+++ b/source/nsswitch/libwbclient/wbc_sid.c
@@ -311,16 +311,16 @@ wbcErr wbcLookupRids(struct wbcDomainSid *dom_sid,
 	char *domain_name = NULL;
 	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
 
-	if (!dom_sid || (num_rids == 0)) {
-		wbc_status = WBC_ERR_INVALID_PARAM;
-		BAIL_ON_WBC_ERROR(wbc_status);
-	}
-
 	/* Initialise request */
 
 	ZERO_STRUCT(request);
 	ZERO_STRUCT(response);
 
+	if (!dom_sid || (num_rids == 0)) {
+		wbc_status = WBC_ERR_INVALID_PARAM;
+		BAIL_ON_WBC_ERROR(wbc_status);
+	}
+
 	wbc_status = wbcSidToString(dom_sid, &sid_string);
 	BAIL_ON_WBC_ERROR(wbc_status);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list