diff options
Diffstat (limited to 'source3/winbindd/winbindd_ping_dc.c')
-rw-r--r-- | source3/winbindd/winbindd_ping_dc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_ping_dc.c b/source3/winbindd/winbindd_ping_dc.c index 7f52040a04..93b16cda8c 100644 --- a/source3/winbindd/winbindd_ping_dc.c +++ b/source3/winbindd/winbindd_ping_dc.c @@ -22,6 +22,7 @@ #include "librpc/gen_ndr/ndr_wbint_c.h" struct winbindd_ping_dc_state { + const char *dcname; NTSTATUS result; }; @@ -61,7 +62,8 @@ struct tevent_req *winbindd_ping_dc_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - subreq = dcerpc_wbint_PingDc_send(state, ev, dom_child_handle(domain)); + subreq = dcerpc_wbint_PingDc_send(state, ev, dom_child_handle(domain), + &state->dcname); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } @@ -96,5 +98,10 @@ NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req, set_auth_errors(presp, state->result); } + if (state->dcname) { + presp->extra_data.data = talloc_strdup(presp, state->dcname); + presp->length += strlen((char *)presp->extra_data.data) + 1; + } + return tevent_req_simple_recv_ntstatus(req); } |