ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/04/30/12:22:40

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 20:15:28 +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: <310163284.20010430201528@logos-m.ru>
To: Corinna Vinschen <cygwin-apps AT cygwin DOT com>
Subject: Re: rshd uses pipes to communicate with shell
In-reply-To: <20010429220820.E22095@cygbert.vinschen.de>
References: <13043917449 DOT 20010428233534 AT logos-m DOT ru>
<20010429220820 DOT E22095 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> On Sat, Apr 28, 2001 at 11:35:34PM +0400, egor duda wrote:
>> Hi!
>> 
>>   is there some special reason for using pipes in rshd? this breaks
>> programs that rely on getpeername() for additional security check when
>> they're called from rshd.

CV> It's the base implementation. I didn't change anything except for
CV> getting it working. Feel free to change it but be aware of that
CV> annoying socketpair problem some users have. Just in case...

oh, i see. i should make myself clearer.  i'm talking about

#ifdef __CYGWIN__
        int cv[2];
#endif

in rshd.c. base implementation uses pipe to handle stderr, but cygwin
version seems to handle stdout via pipe too. if some program started
by rshd then calls getpeername (1, &name, &name_len), it fails with
ENOTSOCK. i suspect there was some reason for adding 'cv', wasn't
there?

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