From 776bc13f0b83c47c87b73baf7dab2a044ed767b8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 4 Oct 2018 14:48:14 -0400 Subject: test: librerelease: Use AuthorizedKeysCommand to bypass perm checks on $TMPDIR If $TMPDIR is permissively owned (as /tmp is), then sshd will refuse to look at the AuthorizedKeysFile. So bypass that permission check by configuring AuthrorizedKeysCommand to just `cat` that file. --- test/cases/librerelease.bats | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/cases/librerelease.bats b/test/cases/librerelease.bats index 1e29525..3aa8450 100644 --- a/test/cases/librerelease.bats +++ b/test/cases/librerelease.bats @@ -7,7 +7,8 @@ setup() { # Configure and start the SSH server install -Dm644 /dev/stdin "$tmpdir/etc/ssh/sshd_config" <<-eot - AuthorizedKeysFile ${HOME}/.ssh/id_rsa.pub + AuthorizedKeysCommand /usr/bin/cat ${HOME}/.ssh/id_rsa.pub + AuthorizedKeysCommandUser ${USER} PasswordAuthentication no AcceptEnv TMPDIR AcceptEnv _HOME GNUPGHOME XDG_CACHE_HOME XDG_CONFIG_HOME -- cgit v1.2.2