From 4ee9d715a01b3770707b11561cc10798aba790ca Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 24 Jan 2008 17:40:35 -0800 Subject: Fix missing error check that caused crash when winbindd not running. Jeremy. (This used to be commit f5ca241e2c1adf2ae836fae33a4adac916f46416) --- source3/nsswitch/libwbclient/wbc_sid.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/nsswitch/libwbclient/wbc_sid.c') diff --git a/source3/nsswitch/libwbclient/wbc_sid.c b/source3/nsswitch/libwbclient/wbc_sid.c index abe1457cc1..f5f553c4c6 100644 --- a/source3/nsswitch/libwbclient/wbc_sid.c +++ b/source3/nsswitch/libwbclient/wbc_sid.c @@ -355,6 +355,7 @@ wbcErr wbcLookupRids(struct wbcDomainSid *dom_sid, &request, &response); talloc_free(ridlist); + BAIL_ON_WBC_ERROR(wbc_status); domain_name = talloc_strdup(NULL, response.data.domain_name); BAIL_ON_PTR_ERROR(domain_name, wbc_status); -- cgit From 1852c29b6e202c9988755cf649786c1635574aa5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 29 Jan 2008 23:01:23 +0100 Subject: Fix uninitialized variables response.extra_data.data is not initialized on the first error path Found by the IBM checker (This used to be commit e9b3115c85e3d04eeaa04bfa71972d393272afca) --- source3/nsswitch/libwbclient/wbc_sid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/nsswitch/libwbclient/wbc_sid.c') diff --git a/source3/nsswitch/libwbclient/wbc_sid.c b/source3/nsswitch/libwbclient/wbc_sid.c index f5f553c4c6..0519d8bf9f 100644 --- a/source3/nsswitch/libwbclient/wbc_sid.c +++ b/source3/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); -- cgit