ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/04/30/07:54:19

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: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Date: Mon, 30 Apr 2001 15:52:09 +0400
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.45) Personal
Reply-To: egor duda <cygwin-apps AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <182188911089.20010430155209@logos-m.ru>
To: Corinna Vinschen <cygwin-apps AT cygwin DOT com>
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

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019