summaryrefslogtreecommitdiff
path: root/cmd/gitlab-shell-authorized-principals-check
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2021-11-10 12:31:58 -0800
committerStan Hu <stanhu@gmail.com>2021-11-10 16:48:26 -0800
commit672013e702cb44c3bc1b46807703295448dc0afc (patch)
tree01195d4a7b4e1415d22cb09e41a6feee182dd4d6 /cmd/gitlab-shell-authorized-principals-check
parent5cccb38df60b9ecef744e8bf1cbdff68066e9d5e (diff)
downloadgitlab-shell-672013e702cb44c3bc1b46807703295448dc0afc.tar.gz
Relax key and username matching for sshdsh-improve-key-matching-sshd
Due to the way sshd works, gitlab-shell could be called with a single string in the form: ``` /path/to/gitlab-shell -c key-id ``` However, due to the tightening of the regular expressions in fcff692b this string no longer matches, so logins would fail with: ``` Failed to get username: who='' is invalid ``` This can be reproduced by changing the user's shell to point to gitlab-shell. For example: ``` usermod git -s /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell ``` While setting gitlab-shell as the user's shell isn't officially supported, gitlab-shell still should be able to cope with the key being specified as the last argument. We now split the argument list and use the last value. Relates to https://gitlab.com/gitlab-org/gitlab-shell/-/issues/530
Diffstat (limited to 'cmd/gitlab-shell-authorized-principals-check')
0 files changed, 0 insertions, 0 deletions