diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-11-12 18:57:31 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-11-12 18:57:31 +0000 |
commit | 579946e2b16b49a2c5347bbd2258382f33581f70 (patch) | |
tree | 5e96598ace23c58c5abde78ee838971645626723 /etc/sshd | |
parent | 3c61530f837656a87543c258f3353c961a0f94a1 (diff) | |
download | pfsense-579946e2b16b49a2c5347bbd2258382f33581f70.zip pfsense-579946e2b16b49a2c5347bbd2258382f33581f70.tar.gz |
MFC
pclose -> fclose
Diffstat (limited to 'etc/sshd')
-rwxr-xr-x | etc/sshd | 90 |
1 files changed, 45 insertions, 45 deletions
@@ -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. */ |