From: Volker Lendecke Date: Mon, 26 Feb 2018 14:32:05 +0000 (+0100) Subject: winbind: Fix --ping-dc error handling X-Git-Tag: talloc-2.1.12~334 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c38062604b7884fa97e63ad28ed2f2a86880d022;p=thirdparty%2Fsamba.git winbind: Fix --ping-dc error handling If the child dies at the wrong moment, we get an error in the "req" itself. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13309 Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Mar 1 14:48:19 CET 2018 on sn-devel-144 --- diff --git a/source3/winbindd/winbindd_ping_dc.c b/source3/winbindd/winbindd_ping_dc.c index a6cea79ee2a..c1a0a7b0ec6 100644 --- a/source3/winbindd/winbindd_ping_dc.c +++ b/source3/winbindd/winbindd_ping_dc.c @@ -115,6 +115,11 @@ NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req, { struct winbindd_ping_dc_state *state = tevent_req_data( req, struct winbindd_ping_dc_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + return status; + } if (!NT_STATUS_IS_OK(state->result)) { set_auth_errors(presp, state->result);