diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_socket.cc | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index aa9c154..d47a7a7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +Thu Aug 16 09:38:59 2001 Jason Tishler <jason@tishler.net> + + * fhandler_socket.cc (fhandler_socket::create_secret_event): Relax + security of secret_event so AF_UNIX socket clients can connect to + servers even if running under a different user account. + (fhandler_socket::check_peer_secret_event): Ditto. + Thu Aug 16 16:26:00 2001 Corinna Vinschen <corinna@vinschen.de> * resource.cc (getrlimit): Return getdtablesize () as current limit diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 9e63489..80d1c92 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -101,7 +101,7 @@ fhandler_socket::create_secret_event (int* secret) __small_sprintf (buf, SECRET_EVENT_NAME, sin.sin_port, secret_ptr [0], secret_ptr [1], secret_ptr [2], secret_ptr [3]); - secret_event = CreateEvent (get_inheritance (), FALSE, FALSE, buf); + secret_event = CreateEvent (get_inheritance(true), FALSE, FALSE, buf); if (!secret_event && GetLastError () == ERROR_ALREADY_EXISTS) secret_event = OpenEvent (EVENT_ALL_ACCESS, FALSE, buf); @@ -136,7 +136,7 @@ fhandler_socket::check_peer_secret_event (struct sockaddr_in* peer, int* secret) __small_sprintf (buf, SECRET_EVENT_NAME, peer->sin_port, secret_ptr [0], secret_ptr [1], secret_ptr [2], secret_ptr [3]); - ev = CreateEvent (&sec_none_nih, FALSE, FALSE, buf); + ev = CreateEvent (&sec_all_nih, FALSE, FALSE, buf); if (!ev && GetLastError () == ERROR_ALREADY_EXISTS) { debug_printf ("%s event already exist"); |