Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Duda <deo@logos-m.ru>2001-04-09 11:21:32 +0400
committerEgor Duda <deo@logos-m.ru>2001-04-09 11:21:32 +0400
commit619f7fa0324c0eecdb7d32c5721c46b7d9a7f80b (patch)
tree0462f1c72eccd24184399cf1db47f005eff59cab /winsup/cygwin/fhandler.h
parentc08e6c44304063ee61333154339c523ad2f7d6aa (diff)
* fhandler.h (class fhandler_socket): Add members and methods to
support secure connections on AF_UNIX sockets. * fhandler_socket.cc (fhandler_socket::set_connect_secret): New method. (fhandler_socket::get_connect_secret): Ditto. (fhandler_socket::create_secret_event): Ditto. (fhandler_socket::close_secret_event): Ditto. (fhandler_socket::check_peer_secret_event): Ditto. (fhandler_socket::fixup_after_fork): Duplicate secret event to child. (fhandler_socket::dup): Copy address family. (fhandler_socket::close): Close secret event. * net.cc (get_inet_addr): Read secret cookie. (cygwin_connect): Check if peer knows secret cookie value. (cygwin_accept): Ditto. Copy address family to newly created socket. (cygwin_bind): Generate and write secret cookie. (wsock_init): Initialize random number generator.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 6a8d11a4c..32ccacc75 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -342,6 +342,8 @@ class fhandler_socket: public fhandler_base
{
private:
int addr_family;
+ int connect_secret [4];
+ HANDLE secret_event;
struct _WSAPROTOCOL_INFOA *prot_info_ptr;
public:
@@ -368,6 +370,11 @@ public:
int ready_for_read (int fd, DWORD howlong, int ignra);
int get_addr_family () {return addr_family;}
void set_addr_family (int af) {addr_family = af;}
+ void set_connect_secret ();
+ void get_connect_secret (char*);
+ HANDLE create_secret_event (int *secret = NULL);
+ int check_peer_secret_event (struct sockaddr_in *peer, int *secret = NULL);
+ void close_secret_event ();
};
class fhandler_pipe: public fhandler_base