add any auth information needed in a bind ack, and process the authentication
information found in the bind.
*/
-NTSTATUS dcesrv_auth_bind_ack(struct dcesrv_call_state *call, struct ncacn_packet *pkt)
+NTSTATUS dcesrv_auth_prepare_bind_ack(struct dcesrv_call_state *call, struct ncacn_packet *pkt)
{
struct dcesrv_connection *dce_conn = call->conn;
- NTSTATUS status;
dce_conn->allow_alter = true;
dce_conn->allow_auth3 = true;
};
call->out_auth_info = &call->_out_auth_info;
+ return NT_STATUS_OK;
+}
+
+NTSTATUS dcesrv_auth_bind_ack(struct dcesrv_call_state *call, struct ncacn_packet *pkt)
+{
+ struct dcesrv_connection *dce_conn = call->conn;
+ NTSTATUS status;
+
+ status = dcesrv_auth_prepare_bind_ack(call, pkt);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (dce_conn->auth_state.auth_finished) {
+ return NT_STATUS_OK;
+ }
+
status = gensec_update_ev(dce_conn->auth_state.gensec_security,
call, call->event_ctx,
call->in_auth_info.credentials,