]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Check for perms to run agent-getpeereid test.
authorDarren Tucker <dtucker@dtucker.net>
Thu, 18 Aug 2022 11:36:39 +0000 (21:36 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Thu, 18 Aug 2022 11:36:39 +0000 (21:36 +1000)
Ubuntu 22.04 defaults to private home dirs which prevents "nobody"
running ssh-add during the agent-getpeereid test.  Check for this and
add the necessary permissions.

.github/setup_ci.sh

index fe5e13ff03ce2b5583e783fb40ced362280aaf29..7dec34beedc1e7331a4856f0607988552b882a85 100755 (executable)
@@ -19,7 +19,17 @@ export DEBIAN_FRONTEND=noninteractive
 
 set -ex
 
-lsb_release -a
+if [ -x "`which lsb_release 2>&1`" ]; then
+       lsb_release -a
+fi
+
+# Ubuntu 22.04 defaults to private home dirs which prevent the
+# agent-getpeerid test from running ssh-add as nobody.  See
+# https://github.com/actions/runner-images/issues/6106
+if [ ! -z "$SUDO" ] && ! "$SUDO" -u nobody test -x ~; then
+       echo ~ is not executable by nobody, adding perms.
+       chmod go+x ~
+fi
 
 if [ "${TARGETS}" = "kitchensink" ]; then
        TARGETS="krb5 libedit pam sk selinux"