upstream: Check if we can copy sshd or need to use sudo to do so

during reexec test. Skip test if neither can work.  Patch from anton@, tweaks
from me.

OpenBSD-Regress-ID: 731b96ae74d02d5744e1f1a8e51d09877ffd9b6d
This commit is contained in:
dtucker@openbsd.org 2023-01-19 07:53:45 +00:00 committed by Damien Miller
parent b2a2a8f69f
commit 405fba7196
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
# $OpenBSD: reexec.sh,v 1.12 2017/08/07 03:52:55 dtucker Exp $
# $OpenBSD: reexec.sh,v 1.13 2023/01/19 07:53:45 dtucker Exp $
# Placed in the Public Domain.
tid="reexec tests"
@ -49,7 +49,7 @@ if [ "$os" != "cygwin" ]; then
verbose "test reexec fallback"
start_sshd_copy
rm -f $SSHD_COPY
$SUDO rm -f $SSHD_COPY
copy_tests