/* hold the authentication state information */
struct dcesrv_auth {
+ enum dcerpc_AuthType auth_type;
+ enum dcerpc_AuthLevel auth_level;
+ uint32_t auth_context_id;
struct dcerpc_auth *auth_info;
struct gensec_security *gensec_security;
struct auth_session_info *session_info;
DATA_BLOB partial_input;
- /* the current authentication state */
- struct dcesrv_auth auth_state;
+ /* This can be removed in master... */
+ struct {
+ struct dcerpc_auth *auth_info;
+ struct gensec_security *gensec_security;
+ struct auth_session_info *session_info;
+ NTSTATUS (*session_key)(struct dcesrv_connection *, DATA_BLOB *session_key);
+ bool client_hdr_signing;
+ bool hdr_signing;
+ } _unused_auth_state;
/* the event_context that will be used for this connection */
struct tevent_context *event_ctx;
const struct tsocket_address *local_address;
const struct tsocket_address *remote_address;
+
+ /* the current authentication state */
+ struct dcesrv_auth auth_state;
};
uint32_t auth_length;
if (pkt->auth_length == 0) {
+ auth->auth_type = DCERPC_AUTH_TYPE_NONE;
+ auth->auth_level = DCERPC_AUTH_LEVEL_NONE;
+ auth->auth_context_id = 0;
dce_conn->auth_state.auth_info = NULL;
return true;
}
return false;
}
+ auth->auth_type = dce_conn->auth_state.auth_info->auth_type;
+ auth->auth_level = dce_conn->auth_state.auth_info->auth_level;
+ auth->auth_context_id = dce_conn->auth_state.auth_info->auth_context_id;
+
server_credentials
= cli_credentials_init(call);
if (!server_credentials) {
}
}
- status = gensec_start_mech_by_authtype(auth->gensec_security, auth->auth_info->auth_type,
- auth->auth_info->auth_level);
+ status = gensec_start_mech_by_authtype(auth->gensec_security, auth->auth_type,
+ auth->auth_level);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(3, ("Failed to start GENSEC mechanism for DCERPC server: auth_type=%d, auth_level=%d: %s\n",
- (int)auth->auth_info->auth_type,
- (int)auth->auth_info->auth_level,
+ (int)auth->auth_type,
+ (int)auth->auth_level,
nt_errstr(status)));
return false;
}