summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-08-03 07:15:38 +0000
committerColin Smith <colin@pfsense.org>2005-08-03 07:15:38 +0000
commit7822d9660ccf2116b3377fefb4c23f680bb648b4 (patch)
tree824a83c4c2d47201e1679693487e01fbc68cf2aa
parent909d8f12bfb6bcf7497eacc684ebdd16ee4d4109 (diff)
downloadpfsense-7822d9660ccf2116b3377fefb4c23f680bb648b4.zip
pfsense-7822d9660ccf2116b3377fefb4c23f680bb648b4.tar.gz
return_filename_as_string -> file_get_contents
-rwxr-xr-xetc/rc.bootup2
-rwxr-xr-xetc/sshd14
-rwxr-xr-xusr/local/www/diag_backup.php4
3 files changed, 10 insertions, 10 deletions
diff --git a/etc/rc.bootup b/etc/rc.bootup
index 1235ec9..214c2cf 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -40,7 +40,7 @@
touch("{$g['varrun_path']}/booting");
if($g['platform'] == "cdrom") {
- $motd = trim(return_filename_as_string("/etc/motd"));
+ $motd = trim(file_get_contents("/etc/motd"));
if(strlen($motd) > 2) echo "\n{$motd}\n\n";
}
diff --git a/etc/sshd b/etc/sshd
index f7486b3..2b545cc 100755
--- a/etc/sshd
+++ b/etc/sshd
@@ -113,17 +113,17 @@
system("/usr/bin/ssh-keygen -t dsa -N '' -f $sshConfigDir/ssh_host_dsa_key");
/* save keys */
- $dsa = return_filename_as_string("{$sshConfigDir}/ssh_host_dsa_key");
- $rsa = return_filename_as_string("{$sshConfigDir}/ssh_host_rsa_key");
- $rsa1 = return_filename_as_string("{$sshConfigDir}/ssh_host_key");
+ $dsa = file_get_contents("{$sshConfigDir}/ssh_host_dsa_key");
+ $rsa = file_get_contents("{$sshConfigDir}/ssh_host_rsa_key");
+ $rsa1 = file_get_contents("{$sshConfigDir}/ssh_host_key");
$config['ssh']['dsa'] = base64_encode($dsa);
$config['ssh']['rsa'] = base64_encode($rsa);
$config['ssh']['rsa1']= base64_encode($rsa1);
/* save public keys */
- $dsapub = return_filename_as_string("{$sshConfigDir}/ssh_host_dsa_key.pub");
- $rsapub = return_filename_as_string("{$sshConfigDir}/ssh_host_rsa_key.pub");
- $rsa1pub = return_filename_as_string("{$sshConfigDir}/ssh_host_key.pub");
+ $dsapub = file_get_contents("{$sshConfigDir}/ssh_host_dsa_key.pub");
+ $rsapub = file_get_contents("{$sshConfigDir}/ssh_host_rsa_key.pub");
+ $rsa1pub = file_get_contents("{$sshConfigDir}/ssh_host_key.pub");
$config['ssh']['dsa_key'] = base64_encode($dsapub);
$config['ssh']['rsa_key'] = base64_encode($rsapub);
$config['ssh']['rsa1_key']= base64_encode($rsa1pub);
@@ -176,4 +176,4 @@
system("/usr/sbin/sshd");
fwrite($stderr, "Done.\n");
-?> \ No newline at end of file
+?>
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index 2ecdfad..c4ec1e2 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -131,7 +131,7 @@ if ($_POST) {
}
if($_POST['restorearea'] <> "") {
/* restore a specific area of the configuration */
- $rules = return_filename_as_string($_FILES['conffile']['tmp_name']);
+ $rules = file_get_contents($_FILES['conffile']['tmp_name']);
restore_config_section($_POST['restorearea'], $rules);
filter_configure();
$savemsg = "The configuration area has been restored.";
@@ -267,4 +267,4 @@ if($reloadall == true) {
reload_all();
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud