runtests: skip starting the ssh server if user name is lacking

Because the ssh server startup script *requires* a user name there's no
point in invoking it if no name was found.

Reported-by: Ricardo M. Correia
Ref: #9007
Closes #9013
This commit is contained in:
Daniel Stenberg 2022-06-14 23:58:26 +02:00
parent 4572489c59
commit f0f587d347
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2195,6 +2195,11 @@ sub runsshserver {
my $logfile;
my $port = 20000; # no lower port
if(!$USER) {
logmsg "Can't start ssh server due to lack of USER name";
return (0,0,0);
}
$server = servername_id($proto, $ipvnum, $idnum);
$pidfile = $serverpidfile{$server};