diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-02-23 17:39:46 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-02-23 17:39:46 +0000 |
commit | c8b404bf5c8c5268ef9a288d8c59b7e3ea935e8b (patch) | |
tree | 619b38b52fa65a469b1d8ca788b9a834a15768c9 /winsup/cygwin/include | |
parent | 81d0376064d861df4d70f1263ec627af96486443 (diff) | |
download | cygnal-c8b404bf5c8c5268ef9a288d8c59b7e3ea935e8b.tar.gz cygnal-c8b404bf5c8c5268ef9a288d8c59b7e3ea935e8b.tar.bz2 cygnal-c8b404bf5c8c5268ef9a288d8c59b7e3ea935e8b.zip |
* cygwin.din (getpeereid): Export.
* fhandler.h (class fhandler_socket): Add pipe and id members to
exchange eid credentials for AF_LOCAL sockets.
(eid_pipe_name): Declare new method.
(getpeereid): Ditto.
* fhandler_socket.cc (fhandler_socket::eid_pipe_name): New method.
(fhandler_socket::fhandler_socket): Initialize sec_pipe.
(fhandler_socket::connect): Exchange eid credentials with accepting
socket process.
(fhandler_socket::listen): Prepare eid credential transaction.
(fhandler_socket::accept): Exchange eid credentials with connecting
socket process.
(fhandler_socket::close): Close eid credentials pipe if open.
(fhandler_socket::getpeereid): New method.
* net.cc (cygwin_getsockopt): Add SO_PEERCRED handling.
(getpeereid): New function.
* include/asm/socket.h (SO_PEERCRED): Define.
* include/cygwin/socket.h (struct ucred): Define new type.
* include/cygwin/version.h: Bump API minor version.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/asm/socket.h | 1 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/socket.h | 6 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/winsup/cygwin/include/asm/socket.h b/winsup/cygwin/include/asm/socket.h index b1392ce22..ed062190c 100644 --- a/winsup/cygwin/include/asm/socket.h +++ b/winsup/cygwin/include/asm/socket.h @@ -54,6 +54,7 @@ details. */ #define SO_LINGER 0x0080 /* linger on close if data present */ #define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ #define SO_DONTLINGER (u_int)(~SO_LINGER) +#define SO_PEERCRED 0x0200 /* same as getpeereid */ /* * Additional options. diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h index 67e1345f2..f6dc11353 100644 --- a/winsup/cygwin/include/cygwin/socket.h +++ b/winsup/cygwin/include/cygwin/socket.h @@ -25,6 +25,12 @@ struct sockaddr { #include <cygwin/uio.h> /* iovec support */ #include <sys/types.h> +struct ucred { + pid_t pid; + __uid32_t uid; + __gid32_t gid; +}; + struct linger { unsigned short l_onoff; /* Linger active */ unsigned short l_linger; /* How long to linger for */ diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 10cf2ba2d..11db44cc0 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -248,13 +248,13 @@ details. */ 118: Export getpriority, setpriority. 119: Export fdatasync. 120: Export basename, dirname. - 121: Export statvfs, fstatvfs. + 122: Export statvfs, fstatvfs. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 121 +#define CYGWIN_VERSION_API_MINOR 122 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible |