From: Dan Fandrich Date: Thu, 29 Mar 2007 05:25:11 +0000 (+0000) Subject: Abort if attempting to run as root. X-Git-Tag: curl-7_16_2~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f776c1d2eb6d38849ee78b7c322bb435b439e5d8;p=thirdparty%2Fcurl.git Abort if attempting to run as root. --- diff --git a/tests/sshserver.pl b/tests/sshserver.pl index b910fd9dbe..be0d0480c4 100644 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -76,6 +76,11 @@ if ($verbose) { print STDERR "SFTP server plugin found at $sftp\n"; } +if ($username eq "root") { + print "Will not run ssh daemon as root to mitigate security risks\n"; + exit 1; +} + if (! -e "curl_client_key.pub") { if ($verbose) { print STDERR "Generating host and client keys...\n";