diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-06-03 20:22:10 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-06-03 20:22:10 +0000 |
commit | 471d63e6c58e27cc6d8e149cbc00591165b8fdf8 (patch) | |
tree | bb7a9b900cc5272761985ce215b090045c915166 /packages | |
parent | 5ad12eb6e9f0c66ea9d340cf15231e6a5b4cbe27 (diff) | |
download | pfsense-packages-471d63e6c58e27cc6d8e149cbc00591165b8fdf8.tar.gz pfsense-packages-471d63e6c58e27cc6d8e149cbc00591165b8fdf8.tar.bz2 pfsense-packages-471d63e6c58e27cc6d8e149cbc00591165b8fdf8.zip |
Make index.php not writable until package deinstallation.
Diffstat (limited to 'packages')
-rw-r--r-- | packages/dashboard/dashboard.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/dashboard/dashboard.inc b/packages/dashboard/dashboard.inc index f2a53453..85af9936 100644 --- a/packages/dashboard/dashboard.inc +++ b/packages/dashboard/dashboard.inc @@ -7,6 +7,7 @@ function dashboard_install() { mwexec("cp /usr/local/www/index.php /usr/local/www/index.php.before_dashboard"); /* backup the pre-dashboard fbegin.inc file */ mwexec("cp /usr/local/www/fbegin.inc /usr/local/www/fbegin.inc.before_dashboard"); + mwexec("chmod a-w /usr/local/www/index.php"); } mwexec("tar xzvpf /usr/local/pkg/widgets.tgz -C /usr/local/www/"); } @@ -15,6 +16,7 @@ function dashboard_deinstall() { global $g, $config; if(file_exists("/usr/local/www/index.php.before_dashboard")) { /* restore the files prior to the dashboard package installation */ + mwexec("chmod ug+rw /usr/local/www/index.php"); mwexec("cp /usr/local/www/index.php.before_dashboard /usr/local/www/index.php"); mwexec("cp /usr/local/www/fbegin.inc.before_dashboard /usr/local/www/fbegin.inc"); } |