diff options
-rwxr-xr-x | etc/sshd | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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*"); } } |