git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] git wrapper: execute git-shell when argv[1] is '-c'

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2008, 17:43 UTC
Message-ID
<7vod3facz7.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<vpqy72ktgg7.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 12 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>> On Tue, 26 Aug 2008, Tommi Virtanen wrote:
>>
>>> All I'm going to say is that that's not the way you build trustable 
>>> software. You take a minimal interface and restrict untrusted users to 
>>> that, you don't add a feature to the widest possible interface..
>>
>> I do not get your point.
>
> With your patch, AAUI, one would put /usr/bin/git as a shell in
> passwd....
Well, it was sheer stupidity of mine.

Let's stop this and apply this patch instead. The patch text is obvious so I won't quote.

-- * --
From: Junio C Hamano <gitster@pobox.com>
Date: Mon, 25 Aug 2008 22:39:17 -0700
Subject: [PATCH] Revert "Build-in "git-shell""

This reverts commit daa0cc9a92c9c2c714aa5f7da6d0ff65b93e0698. It was a stupid idea to do this; when run as a log-in shell, it is spawned with argv[0] set to "-git-shell", so the usual name-based dispatch would not work to begin with.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
 Makefile        |    2 +-
 builtin-shell.c |   90 -------------------------------------------------------
 builtin.h       |    1 -
 git.c           |    1 -
 shell.c         |   89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 90 insertions(+), 93 deletions(-)
-- 
1.6.0.1.113.g0a79b
Previous: Matthieu MoyNext: Mike Ralphson
Message 19 of 28 in “"git shell" won't work, need "git-shell"”
  1. "git shell" won't work, need "git-shell"Tommi Virtanen, Aug 24, 2008
  2. Junio C HamanoAug 24, 2008
  3. Tommi VirtanenAug 24, 2008
  4. Junio C HamanoAug 24, 2008
  5. Tommi VirtanenAug 24, 2008
  6. Johannes SchindelinAug 25, 2008
  7. Paolo BonziniAug 25, 2008
  8. Johannes SchindelinAug 25, 2008
  9. Mikael MagnussonAug 25, 2008
  10. Johannes SchindelinAug 25, 2008
  11. Johannes SchindelinAug 25, 2008
  12. 1/2 git wrapper: Make while loop more reader-friendlyJohannes Schindelin, Aug 25, 2008
  13. 2/2 git wrapper: execute git-shell when argv[1] is '-c'Johannes Schindelin, Aug 25, 2008
  14. Tommi VirtanenAug 25, 2008
  15. Johannes SchindelinAug 25, 2008
  16. Tommi VirtanenAug 25, 2008
  17. Johannes SchindelinAug 26, 2008
  18. Matthieu MoyAug 26, 2008
  19. Junio C HamanoAug 26, 2008
  20. Mike RalphsonAug 26, 2008
  21. Petr BaudisAug 25, 2008
  22. Dmitry PotapovAug 25, 2008
  23. Tommi VirtanenAug 25, 2008
  24. Dmitry PotapovAug 25, 2008
  25. Johannes SchindelinAug 25, 2008
  26. Dmitry PotapovAug 25, 2008
  27. Mike HommeyAug 25, 2008
  28. Dmitry V. LevinOct 28, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.