From 7e6d816a9324e975811a08220413e159a9fbac63 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 17 Jul 2005 20:16:00 +0000 Subject: Use correct path. DOH! --- etc/sshd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/etc/sshd b/etc/sshd index 16e7a5e..69b3e71 100755 --- a/etc/sshd +++ b/etc/sshd @@ -34,8 +34,6 @@ function file_size($file) { $size = filesize($file); - if ( $size == 0) - $size = exec("ls -l $file | awk '{print $5}'"); return $size; } @@ -44,8 +42,8 @@ */ $files_to_check = array('ssh_host_dsa_key','ssh_host_dsa_key.pub','ssh_host_key','ssh_host_key.pub','ssh_host_rsa_key','ssh_host_rsa_key.pub','/root/.authorized_keys'); foreach($files_to_check as $f2c) { - if(file_exists($f2c)) - if(file_size($f2c)==0) { + if(file_exists("/etc/ssh/{$f2c}")) + if(file_size("/etc/ssh/{$f2c}")==0) { mwexec("rm /etc/ssh_host*"); } } -- cgit v1.1