git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: Mike Hommey <mh@glandium.org>
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
	Dmitry Potapov <dpotapov@gmail.com>,
	git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Allow git-shell to be used as a ssh forced-command
Date: Sat, 18 Apr 2009 09:46:25 +0200	[thread overview]
Message-ID: <vpqzleev1ym.fsf@bauges.imag.fr> (raw)
In-Reply-To: <20090417234425.GC17753@glandium.org> (Mike Hommey's message of "Sat\, 18 Apr 2009 01\:44\:25 +0200")

Mike Hommey <mh@glandium.org> writes:

> However, the patch in its current form will definitely break gitosis if
> it doesn't unset SSH_ORIGINAL_COMMAND.

... and any home-made script without knowledge of this feature. If I
wanted to add some restrictions to git-shell, it would seem natural to
me to write a script like

#! /bin/sh

if [ ??? ]; then
	git-shell $whatever
else
	echo "Sorry, forbidden"
	exit 1
fi

(I never did this with Git because I never had to manage any kind of
permission control with it, but I have a script like that for SVN that
adds some argument to the SVN command)

If the command ignores its arguments, and use some other environment
variable instead, then the security hole is not far.

-- 
Matthieu

  reply	other threads:[~2009-04-18  7:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 21:10 [PATCH] Allow git-shell to be used as a ssh forced-command Mike Hommey
2009-04-17 16:24 ` Dmitry Potapov
2009-04-17 19:49   ` Mike Hommey
2009-04-17 21:00     ` Dmitry Potapov
2009-04-17 22:36       ` Mike Hommey
2009-04-17 22:41         ` Shawn O. Pearce
2009-04-17 23:44           ` Mike Hommey
2009-04-18  7:46             ` Matthieu Moy [this message]
2009-04-17 23:40 ` Junio C Hamano
2009-04-17 23:48   ` Tommi Virtanen
2009-04-18  1:24     ` Junio C Hamano
2009-04-18  6:31     ` Mike Hommey
2009-04-21  5:43       ` [PATCH v2] " Mike Hommey
2009-04-21  8:05         ` Dmitry Potapov
2009-04-21  9:46           ` Eygene Ryabinkin
2009-04-21  8:13         ` Junio C Hamano
2009-04-21  9:09           ` Mike Hommey
2009-04-21 11:16           ` Dmitry Potapov

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

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

  git send-email \
    --in-reply-to=vpqzleev1ym.fsf@bauges.imag.fr \
    --to=matthieu.moy@imag.fr \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    --cc=spearce@spearce.org \
    /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.
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 NNTP newsgroup(s).