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

[PATCH] "git shell" won't work, need "git-shell"

From
TVTommi Virtanen <tv@eagain.net>
Date
Aug 24, 2008, 20:23 UTC
Message-ID
<20080824202325.GA14930@eagain.net>
>From 8e7935231e8a91d470b3a4a2310803031ef49fc4 Mon Sep 17 00:00:00 2001
From: Tommi Virtanen <tv@eagain.net>
Date: Sun, 24 Aug 2008 23:20:33 +0300
Subject: [PATCH] Install git-shell in bindir, again.

/etc/passwd shell field must be something execable, you can't enter "/usr/bin/git shell" there. git-shell must be present as a separate executable, or it is useless.

Signed-off-by: Tommi Virtanen <tv@eagain.net>
---

Hi. Recent changes moved away from "git-foo" to "git foo", except for some commands that needed backwards compatibility. However, git-shell as a separate binary was removed. I hope you will reinstante git-shell as a publicly visible binary in bin. Here's why:

The shell field in /etc/passwd is *exec*ed, not interpreted via sh -c or some such. For example, source of Debian's shadow, containing /bin/login:

libmisc/shell.c:80:	execle (file, arg, (char *) 0, envp);
I also tested this for real, and having a
test:x:1001:1001:,,,:/home/test:/usr/bin/git-shell
line works, and
test:x:1001:1001:,,,:/home/test:/usr/bin/git shell
just makes ssh loop asking for a password, logging
"User test not allowed because shell /usr/bin/git shell does not exist"

So, as far as I understand, as it currently is, "git shell" is utterly useless for what it was meant to do. Restoring "git-shell" will fix it.

 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 53ab4b5..24d5809 100644
--- a/Makefile
+++ b/Makefile
@@ -1351,7 +1351,7 @@ install: all
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
-	$(INSTALL) git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X '$(DESTDIR_SQ)$(bindir_SQ)'
+	$(INSTALL) git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X git-shell$X '$(DESTDIR_SQ)$(bindir_SQ)'
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_TCLTK
-- 
1.6.0.2.g2ebc0.dirty

-- 
:(){ :|:&};:
Next: Junio C Hamano
Message 1 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.