From f776c1d2eb6d38849ee78b7c322bb435b439e5d8 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 29 Mar 2007 05:25:11 +0000 Subject: Abort if attempting to run as root. --- tests/sshserver.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/sshserver.pl') diff --git a/tests/sshserver.pl b/tests/sshserver.pl index b910fd9db..be0d0480c 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"; -- cgit v1.2.3