Cygwin: AF_UNIX: fix creation of npfs handle

The handle to the device is never needed.  As the name impies,
FSCTL_PIPE_WAIT works on the file system, not on the device level.

Drop opening the device and make sure to open only one handle to NPFS.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-03-07 15:48:21 +01:00
parent d69bcdd671
commit 2f2a75b7bb
3 changed files with 23 additions and 25 deletions

View File

@ -852,12 +852,6 @@ class sun_name_t
class fhandler_socket_unix : public fhandler_socket
{
enum npfs_hdl_t
{
NPFS_DEVICE,
NPFS_DIR
};
protected:
SRWLOCK conn_lock;
SRWLOCK bind_lock;
@ -886,7 +880,7 @@ class fhandler_socket_unix : public fhandler_socket
void set_pipe_non_blocking (bool nonblocking);
int send_my_name ();
int recv_peer_name ();
static NTSTATUS npfs_handle (HANDLE &nph, npfs_hdl_t type);
static NTSTATUS npfs_handle (HANDLE &nph);
HANDLE create_pipe ();
HANDLE create_pipe_instance ();
NTSTATUS open_pipe (HANDLE &ph, PUNICODE_STRING pipe_name);