* transport_pipes.h (PIPE_NAME_PREFIX): New define.
(PIPE_NAME_SUFFIX): Ditto. (class transport_layer_pipes): Convert _pipe_name from char pointer to wchar_t array. * transport_pipes.cc (transport_layer_pipes::transport_layer_pipes): Accommodate the fact that _pipe_name is a wchar_t array, rather than a char pointer. (transport_layer_pipes::transport_layer_pipes): Initialize _pipe_name with variable pipe name based in installation key fetched from Cygwin DLL. (transport_layer_pipes::accept): Call CreateNamedPipeW explicitely. (transport_layer_pipes::connect): Call CreateFileW and WaitNamedPipeW explicitely.
This commit is contained in:
@@ -13,6 +13,9 @@ details. */
|
||||
#ifndef _TRANSPORT_PIPES_H
|
||||
#define _TRANSPORT_PIPES_H
|
||||
|
||||
#define PIPE_NAME_PREFIX L"\\\\.\\pipe\\cygwin-"
|
||||
#define PIPE_NAME_SUFFIX L"-lpc"
|
||||
|
||||
/* Named pipes based transport, for security on NT */
|
||||
class transport_layer_pipes : public transport_layer_base
|
||||
{
|
||||
@@ -36,7 +39,7 @@ public:
|
||||
virtual ~transport_layer_pipes ();
|
||||
|
||||
private:
|
||||
const char *const _pipe_name;
|
||||
wchar_t _pipe_name[40];
|
||||
HANDLE _hPipe;
|
||||
const bool _is_accepted_endpoint;
|
||||
bool _is_listening_endpoint;
|
||||
|
Reference in New Issue
Block a user