summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-09-11 15:27:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-12 02:05:58 (GMT)
commit9a42c03cb71eaa9d41ba67275de38c997a791c32 (patch)
tree44ee74f0b9e03573523e311e7011c26c5f580e84 /Documentation
parent4d4165b80d6b91a255e2847583bd4df98b5d54e1 (diff)
downloadgit-9a42c03cb71eaa9d41ba67275de38c997a791c32.zip
git-9a42c03cb71eaa9d41ba67275de38c997a791c32.tar.gz
git-9a42c03cb71eaa9d41ba67275de38c997a791c32.tar.bz2
shell: drop git-cvsserver support by default
The git-cvsserver script is old and largely unmaintained these days. But git-shell allows untrusted users to run it out of the box, significantly increasing its attack surface. Let's drop it from git-shell's list of internal handlers so that it cannot be run by default. This is not backwards compatible. But given the age and development activity on CVS-related parts of Git, this is likely to impact very few users, while helping many more (i.e., anybody who runs git-shell and had no intention of supporting CVS). There's no configuration mechanism in git-shell for us to add a boolean and flip it to "off". But there is a mechanism for adding custom commands, and adding CVS support here is fairly trivial. Let's document it to give guidance to anybody who really is still running cvsserver. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-shell.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/git-shell.txt b/Documentation/git-shell.txt
index 2e30a3e..54cf256 100644
--- a/Documentation/git-shell.txt
+++ b/Documentation/git-shell.txt
@@ -79,6 +79,22 @@ EOF
$ chmod +x $HOME/git-shell-commands/no-interactive-login
----------------
+To enable git-cvsserver access (which should generally have the
+`no-interactive-login` example above as a prerequisite, as creating
+the git-shell-commands directory allows interactive logins):
+
+----------------
+$ cat >$HOME/git-shell-commands/cvs <<\EOF
+if ! test $# = 1 && test "$1" = "server"
+then
+ echo >&2 "git-cvsserver only handles \"server\""
+ exit 1
+fi
+exec git cvsserver server
+EOF
+$ chmod +x $HOME/git-shell-commands/cvs
+----------------
+
SEE ALSO
--------
ssh(1),