Blob Blame History Raw
/*********************************************************/
/*  toksvc: a framework-native token broker service      */
/*  Copyright (C) 2020  SysDeer Technologies, LLC        */
/*  Released under GPLv2 and GPLv3; see COPYING.TOKSVC.  */
/*********************************************************/

#include <psxtypes/psxtypes.h>
#include <ntapi/ntapi.h>
#include <ntapi/nt_termios.h>

#include "toksvc_daemon_impl.h"
#include "toksvc_driver_impl.h"
#include "toksvc_log_impl.h"

int32_t __stdcall toks_daemon_abort(struct toks_daemon_ctx * dctx)
{
	toks_log_lpc_request(
		dctx,&dctx->reply);

	ntapi->zw_reply_port(
		dctx->hport_daemon,
		&dctx->reply.header);

	ntapi->zw_terminate_process(
		NT_CURRENT_PROCESS_HANDLE,
		NT_STATUS_REQUEST_ABORTED);

	return NT_STATUS_INTERNAL_ERROR;
}