summaryrefslogtreecommitdiff
path: root/bin/gitlab-shell
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-08-01 12:16:42 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2018-08-01 12:47:30 +1000
commit2bdf08e732ad5d959bfebd222e58a7cd4a4971eb (patch)
tree1676c34376205ace5088b34c4a124c86ca7f8d9e /bin/gitlab-shell
parenta686b9a0ee4c180b272b26e45c9a2c6cb84c742c (diff)
parente3fead94b6f71d3501d586cbb2295ea0d1da2b31 (diff)
downloadgitlab-shell-2bdf08e732ad5d959bfebd222e58a7cd4a4971eb.tar.gz
Merge remote-tracking branch 'origin/master' into ash.mckenzie/srp-refactor
Diffstat (limited to 'bin/gitlab-shell')
-rwxr-xr-xbin/gitlab-shell6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/gitlab-shell b/bin/gitlab-shell
index 818a328..1016570 100755
--- a/bin/gitlab-shell
+++ b/bin/gitlab-shell
@@ -5,19 +5,19 @@ unless ENV['SSH_CONNECTION']
exit
end
-key_str = /key-[0-9]+/.match(ARGV.join).to_s
original_cmd = ENV.delete('SSH_ORIGINAL_COMMAND')
require_relative '../lib/gitlab_init'
#
#
-# GitLab shell, invoked from ~/.ssh/authorized_keys
+# GitLab shell, invoked from ~/.ssh/authorized_keys or from an
+# AuthorizedPrincipalsCommand in the key-less SSH CERT mode.
#
#
require File.join(ROOT_PATH, 'lib', 'gitlab_shell')
-if GitlabShell.new(key_str).exec(original_cmd)
+if GitlabShell.new(ARGV.join).exec(original_cmd)
exit 0
else
exit 1