permissions for auth socket in cygwin port of openssh
egor duda
deo@logos-m.ru
Mon Apr 30 04:54:00 GMT 2001
Hi!
Monday, 30 April, 2001 Corinna Vinschen cygwin-apps@cygwin.com wrote:
CV> Oh, wait, is there a reason to not implement that by simply calling
CV> chmod?
there's a little time here between bind() and chmod() during which
socket is unprotected.
CV> Index: ssh-agent.c
CV> ===================================================================
CV> RCS file: /cvs/openssh_cvs/ssh-agent.c,v
CV> retrieving revision 1.54
CV> diff -u -p -r1.54 ssh-agent.c
CV> --- ssh-agent.c 2001/04/04 01:53:21 1.54
CV> +++ ssh-agent.c 2001/04/29 20:05:19
CV> @@ -809,6 +809,9 @@ main(int ac, char **av)
CV> perror("bind");
CV> cleanup_exit(1);
CV> }
CV> +#ifdef HAVE_CYGWIN
CV> + chmod(socket_name, S_IRUSR | S_IWUSR);
CV> +#endif
CV> if (listen(sock, 5) < 0) {
CV> perror("listen");
CV> cleanup_exit(1);
Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
More information about the Cygwin-apps
mailing list