diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-05-14 00:28:50 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-05-21 21:05:09 +0200 |
commit | 278f220c7e2d4428c784105edf1c5db713e14e1b (patch) | |
tree | 95f2090afe0e3b519984d3f5b507edfbe8e45b32 /source4/librpc/rpc | |
parent | e217c2e30aa6f9990f1a1b9a1c67ba79570119a5 (diff) | |
download | samba-278f220c7e2d4428c784105edf1c5db713e14e1b.tar.gz |
s4:librpc: ask for GENSEC_FEATURE_SIGN_PKT_HEADER after the gensec_update() dance
Most features should be added before the update() dance, while
GENSEC_FEATURE_SIGN_PKT_HEADER needs to be after the dance on the client
side.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/librpc/rpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc_auth.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c index 08578c9adcf..e790a9f51d2 100644 --- a/source4/librpc/rpc/dcerpc_auth.c +++ b/source4/librpc/rpc/dcerpc_auth.c @@ -205,6 +205,13 @@ static void bind_auth_next_step(struct composite_context *c) if (!composite_is_ok(c)) return; + if (!more_processing) { + if (state->pipe->conn->flags & DCERPC_HEADER_SIGNING) { + gensec_want_feature(sec->generic_state, + GENSEC_FEATURE_SIGN_PKT_HEADER); + } + } + if (state->out_auth_info.credentials.length == 0) { composite_done(c); return; @@ -271,10 +278,6 @@ static void bind_auth_recv_bindreply(struct tevent_req *subreq) TALLOC_FREE(subreq); if (!composite_is_ok(c)) return; - if (state->pipe->conn->flags & DCERPC_HEADER_SIGNING) { - gensec_want_feature(sec->generic_state, GENSEC_FEATURE_SIGN_PKT_HEADER); - } - if (!state->more_processing) { /* The first gensec_update has not requested a second run, so * we're done here. */ |