Blame src/daemon/toks_daemon_connect.c

5e5175
/*********************************************************/
5e5175
/*  toksvc: a framework-native token broker service      */
5e5175
/*  Copyright (C) 2020  Z. Gilboa                        */
5e5175
/*  Released under GPLv2 and GPLv3; see COPYING.TOKSVC.  */
5e5175
/*********************************************************/
5e5175
5e5175
#include <psxtypes/psxtypes.h>
5e5175
#include <ntapi/ntapi.h>
5e5175
5e5175
#include <toksvc/toksvc.h>
5e5175
#include "toksvc_daemon_impl.h"
5e5175
#include "toksvc_driver_impl.h"
5e5175
5e5175
int32_t __stdcall toks_daemon_connect(nt_tty_port_msg * msg)
5e5175
{
5e5175
	void * hport = 0;
5e5175
5e5175
	msg->ttyinfo.exarg = 0;
5e5175
5e5175
	ntapi->zw_accept_connect_port(
5e5175
		&hport,
5e5175
		msg->header.client_id.process_id,
5e5175
		&msg->header,
5e5175
		NT_LPC_ACCEPT_CONNECTION,0,0);
5e5175
5e5175
	return ntapi->zw_complete_connect_port(hport);
5e5175
}