From 579946e2b16b49a2c5347bbd2258382f33581f70 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 12 Nov 2006 18:57:31 +0000 Subject: MFC pclose -> fclose --- etc/sshd | 90 ++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/etc/sshd b/etc/sshd index d2b0a72..d071364 100755 --- a/etc/sshd +++ b/etc/sshd @@ -38,7 +38,7 @@ echo "SSHD is disabled."; exit; } - + function file_size($file) { $size = filesize($file); return $size; @@ -69,12 +69,12 @@ conf_mount_rw(); $fd = popen("/usr/sbin/pw usermod -n root -H 0", "w"); fwrite($fd, $config['system']['password']); - pclose($fd); + fclose($fd); /* Make the admin passwords are the same as the web admin password. */ $fd = popen("/usr/sbin/pw usermod -n admin -H 0", "w"); fwrite($fd, $config['system']['password']); - pclose($fd); + fclose($fd); $sshConfigDir = "/etc/ssh"; @@ -102,7 +102,7 @@ /* Write the new sshd config file */ $fd = fopen("/etc/ssh/sshd_config", "w"); fwrite($fd, $sshconf); - pclose($fd); + fclose($fd); /* mop up from a badly implemented ssh keys -> cf backup */ if($config['ssh']['dsa_key'] <> "") { @@ -115,11 +115,11 @@ unset($config['ssh']['ak']); write_config("Clearing SSH keys from config.xml"); } - + /* are we already running? if so exit */ if(file_exists("/tmp/keys_generating")) exit; - + if (!file_exists("$sshConfigDir/ssh_host_key") or file_exists("/etc/keys_generating")) { /* remove previous keys and regen later */ file_notice("SSH", "pfSense has started creating your SSH keys. SSH Startup will be delayed. Please note that reloading the filter rules and changes will be delayed until this operation is completed.", "SSH KeyGen", ""); @@ -151,46 +151,46 @@ } else { echo "done.\n"; } - + conf_mount_ro(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + exit; /* exit early, this needs more testing. */ -- cgit v1.1