git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Andreas Schwab'" <schwab@linux-m68k.org>
Cc: "'SZEDER Gábor'" <szeder.dev@gmail.com>,
	"'Ævar Arnfjörð Bjarmason'" <avarab@gmail.com>,
	git@vger.kernel.org, "Bill Honaker" <bhonaker@xid.com>
Subject: RE: [BUG] GIT_SSH_COMMAND is not being decomposed
Date: Mon, 15 Apr 2019 18:34:02 -0400	[thread overview]
Message-ID: <008101d4f3db$56c20410$04460c30$@nexbridge.com> (raw)
In-Reply-To: <87ef63ezt9.fsf@igel.home>

On April 15, 2019 17:14, Andreas Schwab wrote:
> On Apr 15 2019, "Randall S. Becker" <rsbecker@nexbridge.com> wrote:
> 
> > on virtually any platform at my disposal (Windows, Ubuntu, MacOS, the
> > older NonStop variant), and have that work with no problem. Somewhere
> > after get_ssh_command(), the command is being interpreted it its parts
> > either as a shell or something else (still trying to find that).
> 
> See run-command.c:prepare_shell_cmd, if the command contains shell meta
> characters it is passed to sh -c without further quoting.
> 
> Andreas.

Well crap. That explains far too much about what is happening. 😊. One of the special parameters is specified as -S \$ZSSH2 (example, referring to the process name - which begin with $ and have to be escaped with \). This obviously triggers the alternate path and has been problematic. On the older systems, we found fewer (a.k.a just about none) uses of this parameter, so never encountered it. On the newer systems, virtually everyone is using -S. Ergo, behavioural differences. That explains a whole lot of why we need a wrapper script. Thanks for the pointer to the strcspn() reference. I can stop obsessing about this (thanks too Johannes, Szeder, Ævar) for the help.

As a suggestion, with people who know how to escape stuff properly (or not), perhaps we can select the alternate behaviour explicitly using a core.sshIgnoreEscape=true/false option. Thoughts on that?

Regards,
Randall


  reply	other threads:[~2019-04-15 22:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-13 20:27 [BUG] GIT_SSH_COMMAND is not being decomposed Randall S. Becker
2019-04-13 20:39 ` Ævar Arnfjörð Bjarmason
2019-04-13 20:57   ` Randall S. Becker
2019-04-13 21:47   ` SZEDER Gábor
2019-04-14 14:34     ` Randall S. Becker
2019-04-15 19:20     ` Randall S. Becker
2019-04-15 21:14       ` Andreas Schwab
2019-04-15 22:34         ` Randall S. Becker [this message]
2019-04-16  4:24           ` Junio C Hamano
2019-04-15 21:30       ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='008101d4f3db$56c20410$04460c30$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=avarab@gmail.com \
    --cc=bhonaker@xid.com \
    --cc=git@vger.kernel.org \
    --cc=schwab@linux-m68k.org \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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