From 95caf9b2bd40d62ffef77cbacc404d708e90e1c4 Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 12 Oct 2023 03:48:53 +0000 Subject: [PATCH] ensure logs are owned by correct user; feedback/ok dtucker@ --- regress/usr.bin/ssh/test-exec.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index c01a2627658..38b191de2ca 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.98 2023/03/02 11:10:27 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.99 2023/10/12 03:48:53 djm Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -300,6 +300,10 @@ save_debug_log () testname=`echo $tid | tr ' ' _` tarname="$OBJ/failed-$testname-logs.tar" + if [ ! -z "$SUDO" ] ; then + $SUDO chown -R $USER $TEST_SSH_LOGDIR $TEST_REGRESS_LOGFILE \ + $TEST_SSH_LOGFILE $TEST_SSHD_LOGFILE + fi echo $@ >>$TEST_REGRESS_LOGFILE echo $@ >>$TEST_SSH_LOGFILE echo $@ >>$TEST_SSHD_LOGFILE -- 2.20.1