delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/11/16/10:57:53

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 16 Nov 2010 16:57:19 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.7: Win7 SSHD, chown bad file descriptor
Message-ID: <20101116155719.GB32170@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4CDE1200 DOT 9080502 AT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <4CDE1200.9080502@gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Nov 12 21:20, Jeff Odegard wrote:
> Today I installed Cygwin 1.7.7 on Windows 7 Enterprise.  OpenSSH
> version is OpenSSH_5.6p1, OpenSSL 0.9.8o 01 Jun 2010
> 
> With admin privileges, I set up sshd as a service using
> ssh-host-config, and said yes to all questions except I kept the
> cyg_server username.
> 
> The service started fine, then I tried to ssh to the system, entered
> user/pass, and was immediately disconnected.  The windows
> application log had the following error:
> 
>     sshd: PID 728: fatal: chown(/dev/tty0, 1000, 1002) failed: Bad
> file descriptor
> 
> $ ls -la /dev/tty0
> crw------- 1 SYSTEM Administrators 136, 0 2010-11-12 14:41 /dev/tty0
>     (I noticed on older Cygwins on XP this is crw-rw-rw-  Can I
> change this?  Will it stay permanent on reboot?  This looks like a
> security issue, having a tty world read/writable.)

This is just the default ls output for ttys which currently don't exist.
As soon as a tty starts to exist, the permissions shown in ls output
will reflect the actual owner and permissions.  You only can change the
perms when the tty exists and you have sufficent privileges.

Having said that, this problem looks vaguely similar to the one
reported in http://cygwin.com/ml/cygwin/2010-11/msg00097.html.
Needless to say that I can't reproduce it either, just like Ken's
problem.

I'm really puzzled thinking of something which could trigger that
effect.  Maybe it's some kind of BLODA problem which affects setting
permissions on pipes?!?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


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