public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cygrunsrv fails to prompt for user password
@ 2012-07-06 17:39 Steven Hartland
  2012-07-07  4:05 ` cygwin getpass broken recently? was: " Steven Hartland
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Hartland @ 2012-07-06 17:39 UTC (permalink / raw)
  To: Cygwin List

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 <username> 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?

    Regards
    Steve


--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* cygwin getpass broken recently? was: cygrunsrv fails to prompt for user password
  2012-07-06 17:39 cygrunsrv fails to prompt for user password Steven Hartland
@ 2012-07-07  4:05 ` Steven Hartland
  2012-07-09 12:39   ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Hartland @ 2012-07-07  4:05 UTC (permalink / raw)
  To: Cygwin List

----- 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 <username> 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?

    Regards
    Steve


--
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cygwin getpass broken recently? was: cygrunsrv fails to prompt for user password
  2012-07-07  4:05 ` cygwin getpass broken recently? was: " Steven Hartland
@ 2012-07-09 12:39   ` Corinna Vinschen
  2012-07-09 13:01     ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Corinna Vinschen @ 2012-07-09 12:39 UTC (permalink / raw)
  To: cygwin

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 <username> 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 ...'


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cygwin getpass broken recently? was: cygrunsrv fails to prompt for user password
  2012-07-09 12:39   ` Corinna Vinschen
@ 2012-07-09 13:01     ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2012-07-09 13:01 UTC (permalink / raw)
  To: cygwin

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 <username> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-09 13:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-06 17:39 cygrunsrv fails to prompt for user password Steven Hartland
2012-07-07  4:05 ` cygwin getpass broken recently? was: " Steven Hartland
2012-07-09 12:39   ` Corinna Vinschen
2012-07-09 13:01     ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).