Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Date: Mon, 30 Apr 2001 15:52:09 +0400 From: egor duda X-Mailer: The Bat! (v1.45) Personal Reply-To: egor duda Organization: deo X-Priority: 3 (Normal) Message-ID: <182188911089.20010430155209@logos-m.ru> To: Corinna Vinschen Subject: Re: permissions for auth socket in cygwin port of openssh In-reply-To: <20010429220551.D22095@cygbert.vinschen.de> References: <7734862689 DOT 20010428210439 AT logos-m DOT ru> <20010429215734 DOT C22095 AT cygbert DOT vinschen DOT de> <20010429220551 DOT D22095 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! Monday, 30 April, 2001 Corinna Vinschen cygwin-apps AT cygwin DOT 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 AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19