www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/17/16:59:07

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <4807B9F9.3070305@cwilson.fastmail.fm>
Date: Thu, 17 Apr 2008 16:58:33 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: inetutils-1.5-2 test release
References: <1205857963 DOT 32092 DOT 1243064787 AT webmail DOT messagingengine DOT com> <7z1w67ap8e DOT fsf AT vzell-de DOT de DOT oracle DOT com>
In-Reply-To: <7z1w67ap8e.fsf@vzell-de.de.oracle.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dr. Volker Zell wrote:

Fixed the ftp problem. It was an '=' vs. '==' transcription bug.

> If I try the old rsh against your new daemons it seems to work:
> 
> 06:53 PM [637]> /bin/rsh vzell AT localhost pwd
> /home/vzell

Fixed this. The new version of rsh added a check to ensure that rsh.exe 
client had the setuid bit ON (that is, its getuid() is 'root'), and 
exited otherwise.  Obvious that's wrong on cygwin.  The only reason 
'/bin/rsh user AT machine' (with no command) worked is because that is 
implmented as 'exec rlogin' BEFORE checking the setuid -- and the 
rlogin.exe client does not check that getuid() is 'root').

> and in /var/log/messages:
> 
> Mar 18 18:53:28 localhost rshd: PID 160: 2nd port not reserved 1022

This was a red herring. Just a cut-n-paste error; this log message 
belonged elsewhere in the code.

> Mar 18 18:53:51 localhost rshd: PID 2948: vzell AT xp DOT de DOT oracle DOT com as vzell: cmd='pwd'

Normal log message when a rcmd/rexec/rsh fails. The failure was due to 
the setuid thing, above.

> By the way, for every telnet session I see the following two entries in
> /var/log/messages
> 
> Mar 18 18:02:11 localhost telnetd: PID 180: ttloop: retrying
> Mar 18 18:02:39 localhost telnetd: PID 180: child process 1180 exited: 0
> 
> Is this expected behaviour ?

Well, kinda. If your server is faster than your client...

//<<< function io_drain >>>//
  again:
   ncc = read (net, netibuf, sizeof netibuf);
   if (ncc < 0)
     {
       if (errno == EAGAIN)
         {
           syslog (LOG_INFO, "ttloop: retrying");
           goto again;
         }

It just means that you tried to read from an empty but non-blocking 
socket. I don't really like the way this is coded; it's a 100% busy 
loop. But, that's why it's called ttloop (which is the only caller of 
io_drain):

#define ttloop(c) while (c) io_drain ()

But ttloop is used rather sparingly -- for instance, while doing the 
handshaking to set up the login prompt. Most of the time telnetd sits in 
a select() loop.

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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