From 567970786e0db398b9c2a990efb9060b95406e12 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 22 Oct 2003 10:04:11 +0000 Subject: Accomodate moving cygserver header files from cygwin/include/cygwin to here and cygwin dir. * Makefile.in (EXEEXT): Drop as unused. (EXEEXT_FOR_BUILD): Ditto. (all): Don't build libcygserver.a. * cygserver_process.h: Moved from cygwin/include/cygwin to here. * cygserver_transport.h: Ditto. * cygserver_transport_pipes.h: Ditto. * cygserver_transport_sockets.h: Ditto. * ipc.h: Moved to ../cygwin and renamed to cygserver_ipc.h. * shm.h: Moved to ../cygwin and renamed to cygserver_shm.h. --- winsup/cygserver/cygserver_transport_pipes.h | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 winsup/cygserver/cygserver_transport_pipes.h (limited to 'winsup/cygserver/cygserver_transport_pipes.h') diff --git a/winsup/cygserver/cygserver_transport_pipes.h b/winsup/cygserver/cygserver_transport_pipes.h new file mode 100644 index 000000000..4bea2eb13 --- /dev/null +++ b/winsup/cygserver/cygserver_transport_pipes.h @@ -0,0 +1,53 @@ +/* cygserver_transport_pipes.h + + Copyright 2001, 2002 Red Hat Inc. + + Written by Robert Collins + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#ifndef _CYGSERVER_TRANSPORT_PIPES_ +#define _CYGSERVER_TRANSPORT_PIPES_ + +/* Named pipes based transport, for security on NT */ +class transport_layer_pipes : public transport_layer_base +{ +public: +#ifndef __INSIDE_CYGWIN__ + virtual int listen (); + virtual class transport_layer_pipes *accept (bool *recoverable); +#endif + + virtual void close (); + virtual ssize_t read (void *buf, size_t len); + virtual ssize_t write (void *buf, size_t len); + virtual int connect (); + +#ifndef __INSIDE_CYGWIN__ + virtual void impersonate_client (); + virtual void revert_to_self (); +#endif + + transport_layer_pipes (); + virtual ~transport_layer_pipes (); + +private: + /* for pipe based communications */ + void init_security (); + + //FIXME: allow inited, sd, all_nih_.. to be static members + SECURITY_DESCRIPTOR _sd; + SECURITY_ATTRIBUTES _sec_all_nih; + const char *const _pipe_name; + HANDLE _hPipe; + const bool _is_accepted_endpoint; + bool _is_listening_endpoint; + + transport_layer_pipes (HANDLE hPipe); +}; + +#endif /* _CYGSERVER_TRANSPORT_PIPES_ */ -- cgit v1.2.3