]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Abort if attempting to run as root.
authorDan Fandrich <dan@coneharvesters.com>
Thu, 29 Mar 2007 05:25:11 +0000 (05:25 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 29 Mar 2007 05:25:11 +0000 (05:25 +0000)
tests/sshserver.pl

index b910fd9dbed95ac672d747cda3b61296df3a9add..be0d0480c4c0854d82cd7f241008d966b72f7336 100644 (file)
@@ -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";