From 496337c9a58d7b107ab2a6dfdd25347479cfaa37 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 28 Feb 2005 13:11:50 +0000 Subject: * fhandler.h (class fhandler_socket): Declare new method set_socketpair_eids. * fhandler_socket.cc (fhandler_socket::set_socketpair_eids): New method. (fhandler_socket::dup): Duplicate sec_pipe if necessary. (fhandler_socket::listen): Only create sec_pipe if named pipes are available. Initialized sec_peer_pid to 0 as on Linux. (fhandler_socket::connect): Only run eid credential transaction if named pipes are available. Fake otherwise. Initialized sec_peer_pid to 0 as on Linux. (fhandler_socket::accept): Ditto. (fhandler_socket::close): Move closing sec_pipe handle from here... (fhandler_socket::~fhandler_socket): ... to here. * net.cc (socketpair): Set eid credentials by calling fhandler_socket::set_socketpair_eids() on both socket ends. * wincap.h (wincaps::has_named_pipes): New element. * wincap.cc: Implement above element throughout. --- winsup/cygwin/wincap.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'winsup/cygwin/wincap.cc') diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 4011b5dec..9a790b087 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -42,6 +42,7 @@ static NO_COPY wincaps wincap_unknown = { has_move_file_ex:false, has_negative_pids:false, has_unreliable_pipes:false, + has_named_pipes:false, has_try_enter_critical_section:false, has_raw_devices:false, has_valid_processorlevel:false, @@ -90,6 +91,7 @@ static NO_COPY wincaps wincap_95 = { has_move_file_ex:false, has_negative_pids:true, has_unreliable_pipes:true, + has_named_pipes:false, has_try_enter_critical_section:false, has_raw_devices:false, has_valid_processorlevel:false, @@ -138,6 +140,7 @@ static NO_COPY wincaps wincap_95osr2 = { has_move_file_ex:false, has_negative_pids:true, has_unreliable_pipes:true, + has_named_pipes:false, has_try_enter_critical_section:false, has_raw_devices:false, has_valid_processorlevel:false, @@ -186,6 +189,7 @@ static NO_COPY wincaps wincap_98 = { has_move_file_ex:false, has_negative_pids:true, has_unreliable_pipes:true, + has_named_pipes:false, has_try_enter_critical_section:false, has_raw_devices:false, has_valid_processorlevel:true, @@ -234,6 +238,7 @@ static NO_COPY wincaps wincap_98se = { has_move_file_ex:false, has_negative_pids:true, has_unreliable_pipes:true, + has_named_pipes:false, has_try_enter_critical_section:false, has_raw_devices:false, has_valid_processorlevel:true, @@ -282,6 +287,7 @@ static NO_COPY wincaps wincap_me = { has_move_file_ex:false, has_negative_pids:true, has_unreliable_pipes:true, + has_named_pipes:false, has_try_enter_critical_section:false, has_raw_devices:false, has_valid_processorlevel:true, @@ -330,6 +336,7 @@ static NO_COPY wincaps wincap_nt3 = { has_move_file_ex:true, has_negative_pids:false, has_unreliable_pipes:false, + has_named_pipes:true, has_try_enter_critical_section:false, has_raw_devices:true, has_valid_processorlevel:true, @@ -378,6 +385,7 @@ static NO_COPY wincaps wincap_nt4 = { has_move_file_ex:true, has_negative_pids:false, has_unreliable_pipes:false, + has_named_pipes:true, has_try_enter_critical_section:true, has_raw_devices:true, has_valid_processorlevel:true, @@ -426,6 +434,7 @@ static NO_COPY wincaps wincap_nt4sp4 = { has_move_file_ex:true, has_negative_pids:false, has_unreliable_pipes:false, + has_named_pipes:true, has_try_enter_critical_section:true, has_raw_devices:true, has_valid_processorlevel:true, @@ -474,6 +483,7 @@ static NO_COPY wincaps wincap_2000 = { has_move_file_ex:true, has_negative_pids:false, has_unreliable_pipes:false, + has_named_pipes:true, has_try_enter_critical_section:true, has_raw_devices:true, has_valid_processorlevel:true, @@ -522,6 +532,7 @@ static NO_COPY wincaps wincap_xp = { has_move_file_ex:true, has_negative_pids:false, has_unreliable_pipes:false, + has_named_pipes:true, has_try_enter_critical_section:true, has_raw_devices:true, has_valid_processorlevel:true, @@ -570,6 +581,7 @@ static NO_COPY wincaps wincap_2003 = { has_move_file_ex:true, has_negative_pids:false, has_unreliable_pipes:false, + has_named_pipes:true, has_try_enter_critical_section:true, has_raw_devices:true, has_valid_processorlevel:true, -- cgit v1.2.3