diff options
author | Christof Schmitt <christof.schmitt@us.ibm.com> | 2012-08-09 15:07:16 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-15 11:44:42 +1000 |
commit | 7baa7091b741813f53954380a6ff6e7ff12e601b (patch) | |
tree | 4c900038f2379f8f75b9609529f96ad9d58fd080 | |
parent | 807fb16086126a96a190176b6831c4ae990f94fa (diff) | |
download | samba-7baa7091b741813f53954380a6ff6e7ff12e601b.tar.gz samba-7baa7091b741813f53954380a6ff6e7ff12e601b.tar.bz2 samba-7baa7091b741813f53954380a6ff6e7ff12e601b.zip |
s3-winbind: Pass ping-dc result to client
The client checks for an error code in response.data.auth.nt_status,
make sure the result is stored there.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source3/winbindd/winbindd_ping_dc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_ping_dc.c b/source3/winbindd/winbindd_ping_dc.c index 2304828030..7f52040a04 100644 --- a/source3/winbindd/winbindd_ping_dc.c +++ b/source3/winbindd/winbindd_ping_dc.c @@ -22,7 +22,7 @@ #include "librpc/gen_ndr/ndr_wbint_c.h" struct winbindd_ping_dc_state { - uint8_t dummy; + NTSTATUS result; }; static void winbindd_ping_dc_done(struct tevent_req *subreq); @@ -78,6 +78,7 @@ static void winbindd_ping_dc_done(struct tevent_req *subreq) NTSTATUS status, result; status = dcerpc_wbint_PingDc_recv(subreq, state, &result); + state->result = result; if (any_nt_status_not_ok(status, result, &status)) { tevent_req_nterror(req, status); return; @@ -88,5 +89,12 @@ static void winbindd_ping_dc_done(struct tevent_req *subreq) NTSTATUS winbindd_ping_dc_recv(struct tevent_req *req, struct winbindd_response *presp) { + struct winbindd_ping_dc_state *state = tevent_req_data( + req, struct winbindd_ping_dc_state); + + if (!NT_STATUS_IS_OK(state->result)) { + set_auth_errors(presp, state->result); + } + return tevent_req_simple_recv_ntstatus(req); } |