summaryrefslogtreecommitdiff
path: root/bin/gitlab-shell-authorized-keys-check
diff options
context:
space:
mode:
authorPatrick Bajao <ebajao@gitlab.com>2019-08-15 18:06:04 +0800
committerPatrick Bajao <ebajao@gitlab.com>2019-08-15 18:15:49 +0800
commit41f919eb86a3b1f69876f8b97572615b06521538 (patch)
treec840113cc7dc11643f5c8d7f55601322b2ee698e /bin/gitlab-shell-authorized-keys-check
parentf34e2cd5c4194aa8bb049e1ac8aa1b2f002395b5 (diff)
downloadgitlab-shell-41f919eb86a3b1f69876f8b97572615b06521538.tar.gz
Replace symlinks with actual binaries
We had `gitlab-shell-authorized-keys-check` and `gitlab-shell-authorized-principals-check` as symlinks to `gitlab-shell` before. We determine the `Command` and `CommandArgs` that we build based on the `Name` of the `Executable`. We also use that to know which fallback ruby executable should we fallback to. We use `os.Executable()` to do that. `os.Executable()` behaves differently depending on OS. It may return the symlink or the target's name. That can result to a buggy behavior. The fix is to create binaries for each instead of using a symlink. That way we don't need to rely on `os.Executable()` to get the name. We pass the `Name` of the executable instead.
Diffstat (limited to 'bin/gitlab-shell-authorized-keys-check')
l---------bin/gitlab-shell-authorized-keys-check1
1 files changed, 0 insertions, 1 deletions
diff --git a/bin/gitlab-shell-authorized-keys-check b/bin/gitlab-shell-authorized-keys-check
deleted file mode 120000
index 3dc14d1..0000000
--- a/bin/gitlab-shell-authorized-keys-check
+++ /dev/null
@@ -1 +0,0 @@
-./gitlab-shell \ No newline at end of file