Blame src/daemon/toks_daemon_abort.c

5ab1f5
/*********************************************************/
5ab1f5
/*  toksvc: a framework-native token broker service      */
d91fa0
/*  Copyright (C) 2020  SysDeer Technologies, LLC        */
5ab1f5
/*  Released under GPLv2 and GPLv3; see COPYING.TOKSVC.  */
5ab1f5
/*********************************************************/
5ab1f5
5ab1f5
#include <psxtypes/psxtypes.h>
5ab1f5
#include <ntapi/ntapi.h>
5ab1f5
#include <ntapi/nt_termios.h>
5ab1f5
5ab1f5
#include "toksvc_daemon_impl.h"
5ab1f5
#include "toksvc_driver_impl.h"
982902
#include "toksvc_log_impl.h"
5ab1f5
5ab1f5
int32_t __stdcall toks_daemon_abort(struct toks_daemon_ctx * dctx)
5ab1f5
{
982902
	toks_log_lpc_request(
982902
		dctx,&dctx->reply);
982902
5ab1f5
	ntapi->zw_reply_port(
5ab1f5
		dctx->hport_daemon,
5ab1f5
		&dctx->reply.header);
5ab1f5
5ab1f5
	ntapi->zw_terminate_process(
5ab1f5
		NT_CURRENT_PROCESS_HANDLE,
5ab1f5
		NT_STATUS_REQUEST_ABORTED);
5ab1f5
5ab1f5
	return NT_STATUS_INTERNAL_ERROR;
5ab1f5
}