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/fhandler.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'winsup/cygwin/fhandler.h') diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 2d9aa5f7f..bdc8d3b8a 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -365,7 +365,10 @@ class fhandler_socket: public fhandler_base __uid32_t sec_peer_uid; __gid32_t sec_peer_gid; char *eid_pipe_name (char *buf); + public: + void set_socketpair_eids (void); + private: struct _WSAPROTOCOL_INFOA *prot_info_ptr; char *sun_path; struct status_flags -- cgit v1.2.3