delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/20/16:38:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Fri, 20 Feb 2004 22:38:38 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 2004-Feb-17 snapshot change ssh option parsing behavior
Message-ID: <20040220213838.GR1587@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1077299200 DOT 1982 DOT ezmlm AT cygwin DOT com> <20040220180847 DOT GA8982 AT blorf DOT net>
Mime-Version: 1.0
In-Reply-To: <20040220180847.GA8982@blorf.net>
User-Agent: Mutt/1.4.2i

On Feb 20 10:08, Wayne Davison wrote:
> This is not something that other OSes require, and programs such as
> rsync are broken by this change.  While trying to work around this
> problem, I tried using a remote-shell option of "ssh --" with rsync,
> but ssh still doesn't do the right thing with that either.  You can
> observe the mangled result by inserting an "echo" in the command that
> rsync runs:
> 
> % ssh -- host echo rsync --server -vlogDtpr . destdir/
> rsync -vlogDtpr . destdir/
> 
> Notice how the "--server" option was dropped!  Without the echo, this
> results in starting up a remote local-copy rsync command.  I'm just
> lucky that I hadn't specified a --delete option, or this bug could have
> devestated my home dir on the remote system.
> 
> Reordering the two options above causes ssh to switch to verbose mode
> and try to log-in as "ogDtpr", so it appears to be erroneously parsing
> that first rsync option even when "--" is used (which may well be a bug
> in the BSD getopt routine).
> 
> Yes, setting the POSIXLY_CORRECT environment variable fixes this.
> 
> I think that ssh should not reorder its options -- it's just too
> disruptive of a change in behavior.

Ok, ok, ok.  Since the Cygwin getopt is almost vanilla NetBSD, there's
at least one OS on which getopt behaves identically.

But I can't stand the idea to discuss this over and over again in future.
I've changed Cygwin's getopt to the OpenBSD version which has argument
permutation switched on by default for getopt_Long and switched off by
default for getopt.  That should do it.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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