[sysadmin-bin] run-git-or-special-cmd: properly split the variable into arguments
- From: Olav Vitters <ovitters src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] run-git-or-special-cmd: properly split the variable into arguments
- Date: Sat, 2 Apr 2011 18:55:48 +0000 (UTC)
commit e296a647fa016d5802a14e6aea070d0b4a6dae36
Author: Olav Vitters <olav vitters nl>
Date: Sat Apr 2 20:55:42 2011 +0200
run-git-or-special-cmd: properly split the variable into arguments
run-git-or-special-cmd | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/run-git-or-special-cmd b/run-git-or-special-cmd
index dccfc80..bd45685 100755
--- a/run-git-or-special-cmd
+++ b/run-git-or-special-cmd
@@ -7,9 +7,7 @@
# not world-readable
umask 0002
-if [ "$SSH_ORIGINAL_COMMAND" != "" ]; then
- # $SSH_ORIGINAL_COMMAND has quoting; split it apart into arguments
- eval "set $SSH_ORIGINAL_COMMAND"
+rungitcommand () {
COMMAND=$1
shift
@@ -31,18 +29,16 @@ if [ "$SSH_ORIGINAL_COMMAND" != "" ]; then
exec /home/admin/gitadmin-bin/receive-pack-import "$@"
;;
-# This existed for retrieving mango passwords from svn.gnome.org; if we keep the
-# system and repurpose socket for something else we could move the files to
-# git.gnome.org, but it's a bit of a wonky system.
-# mango)
-# cat "/var/local/mango/`whoami`" 2> /dev/null
-# echo > "/var/local/mango/`whoami`" 2> /dev/null
-# exit
-# ;;
*)
exec /usr/bin/git-shell -c "$SSH_ORIGINAL_COMMAND"
;;
esac
+}
+
+if [ "$SSH_ORIGINAL_COMMAND" != "" ]; then
+ # $SSH_ORIGINAL_COMMAND has quoting; split it apart into arguments
+ # by not quoting the variable
+ rungitcommand $SSH_ORIGINAL_COMMAND
fi
echo 'SSH authentication succeeded. Interactive login is not allowed.'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]