delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/16/18:56:55

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <33339824.post@talk.nabble.com>
Date: Thu, 16 Feb 2012 15:56:03 -0800 (PST)
From: jalbr74 <jalbr74 AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: TTY and sshpass
In-Reply-To: <20120211102430.GD9823@calimero.vinschen.de>
MIME-Version: 1.0
References: <4F3468FA DOT 1030000 AT gmail DOT com> <CAH2jVfbiMGnTZD60bd7jzemVhLT57HWkBUD2QBdpb435ZrEiAg AT mail DOT gmail DOT com> <20120211102430 DOT GD9823 AT calimero DOT vinschen DOT de>
X-IsSubscribed: yes
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

Thank you so much for this temporary workaround.  I tried setting up cygwin
and sshpass on a coworker's machine, and we spent half the day getting
frustrated with it.  I finally updated it on my machine, and realized
something must have broke between when I installed mine, and when we
installed his.

Anyway, tried your fix, and we're back in business.

Thanks!


Corinna Vinschen-2 wrote:
> 
> On Feb 10 18:03, Sylvain Archenault wrote:
>> > On 2/9/2012 7:46 PM, Sylvain Archenault wrote:
>> > I've been using sshpass (http://sourceforge.net/projects/sshpass/) for
>> a
>> > while and it stopped working after I updated cygwin to the last version
>> > 1.7.10-1 (was wokring with 1.7.9).
>> [...]
>> I'm going to contact sshpass author.
> 
> Apart from the fact that sshpass is a very dangerous package for your
> security, and that you should prefer using public keys over using
> sshpass, this seems to be not exactly a sshpass problem.  Rather it's a
> change in the 1.7.10 Cygwin DLL which triggers this behaviour.
> 
> As a temporary workaround, try this patch to sshpass:
> 
> --- main.c.orig	2012-02-11 11:22:44.563278057 +0100
> +++ main.c	2012-02-11 11:16:26.220409437 +0100
> @@ -265,7 +265,8 @@ int runprogram( int argc, char *argv[] )
>  	setsid();
>          // This line makes the ptty our controlling tty. We do not
> otherwise need it open
>          slavept=open(name, O_RDWR );
> -        close( slavept );
> +        //close( slavept );
> +	open ("/dev/tty", O_RDWR);
>  	
>  	close( masterpt );
>  
> 
> 
> 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
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/TTY-and-sshpass-tp33297530p33339824.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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