From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5006 invoked by alias); 9 Jul 2012 13:01:20 -0000 Received: (qmail 4929 invoked by uid 22791); 9 Jul 2012 13:00:58 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 09 Jul 2012 13:00:45 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 2997E2C0074; Mon, 9 Jul 2012 15:00:43 +0200 (CEST) Date: Mon, 09 Jul 2012 13:01:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: cygwin getpass broken recently? was: cygrunsrv fails to prompt for user password Message-ID: <20120709130043.GB20472@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <87292535788F4E2CB162C788878399B8@multiplay.co.uk> <20120709123828.GA20472@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120709123828.GA20472@calimero.vinschen.de> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-07/txt/msg00117.txt.bz2 On Jul 9 14:38, Corinna Vinschen wrote: > On Jul 7 05:05, Steven Hartland wrote: > > ----- Original Message ----- From: "Steven Hartland" > > > > >We're updating our servers to a newer version of cygwin (1.7.15) > > >from previous 1.7 version and in this version the install of > > >cygrunsrv (V1.40, Apr 25 2012) fails to correctly prompt for > > >a user password even though -u is being specified. > > > > > >It seems like cygrunsrv maybe checking for an "interactive" > > >session and incorrectly determining its not as in our case > > >we are running the cygrunsrv via ssh e.g. > > > > > >ssh "cygrunsrv ...." > > > > > >We know that this worked correctly in cygrunsrv V1.34, Mar 18 > > >2008. > > > > > >Bug introduced recently? > > > > After inspecting the code for cygrunsrv and adding some debug > > I've determined this isn't a bug in the util but in cygwin's > > getpass function which I believe may have been changed > > recently by Corinna Vinschen, after googling around. > > > > Is this a new issue caused by these changes Corinna? > > Looks like it. The code doesn't notice if stdin is not connected to a > tty or pty, but to a socket instead and then falls back to returning > with an empty password immediately. I'll fix that in CVS. > > For the time being, the workaround is to run `ssh -t ...' Oh, btw. For security reasons, you should always call ssh -t in this case, otherwise yoy have visible passwords. 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