summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nsswitch/wb_client.c1
-rw-r--r--source3/nsswitch/winbindd_group.c3
-rw-r--r--source3/nsswitch/winbindd_pam.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c
index 5d43139245..a1c71becf0 100644
--- a/source3/nsswitch/wb_client.c
+++ b/source3/nsswitch/wb_client.c
@@ -270,6 +270,7 @@ static int wb_getgroups(const char *user, gid_t **groups)
/* Call winbindd */
+ ZERO_STRUCT(request);
fstrcpy(request.data.username, user);
ZERO_STRUCT(response);
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 4800ab20cf..7b4529144e 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -631,6 +631,9 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
malloc(num_groups * sizeof(struct winbindd_gr))) == NULL)
return WINBINDD_ERROR;
+ memset(state->response.extra_data, '\0',
+ num_groups * sizeof(struct winbindd_gr) );
+
state->response.data.num_entries = 0;
group_list = (struct winbindd_gr *)state->response.extra_data;
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c
index c1840b6053..25f53e7a53 100644
--- a/source3/nsswitch/winbindd_pam.c
+++ b/source3/nsswitch/winbindd_pam.c
@@ -48,6 +48,7 @@ static NTSTATUS append_info3_as_ndr(TALLOC_CTX *mem_ctx,
prs_mem_free(&ps);
return NT_STATUS_NO_MEMORY;
}
+ memset( state->response.extra_data, '\0', size );
prs_copy_all_data_out(state->response.extra_data, &ps);
state->response.length += size;
prs_mem_free(&ps);