1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s3: Fix bug 8904 -- wbinfo --lookup-sids "" crashes winbind

Much of the code further down and up the call chain expects the
structures wb_lookupsids returns to be allocated. Do that despite
we have nothing to look up.
This commit is contained in:
Volker Lendecke 2012-04-28 19:51:46 +02:00
parent 0dc3f423d2
commit 4a28c6ca7c

View File

@ -123,11 +123,6 @@ struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
state->sids = sids;
state->num_sids = num_sids;
if (num_sids == 0) {
tevent_req_done(req);
return tevent_req_post(req, ev);
}
state->single_sids = talloc_array(state, uint32_t, num_sids);
if (tevent_req_nomem(state->single_sids, req)) {
return tevent_req_post(req, ev);
@ -153,6 +148,11 @@ struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
if (num_sids == 0) {
tevent_req_done(req);
return tevent_req_post(req, ev);
}
for (i=0; i<num_sids; i++) {
struct wb_lookupsids_domain *d;