aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-04-16 01:03:18 +0000
committerBill Marquette <billm@pfsense.org>2005-04-16 01:03:18 +0000
commitdbe1ea082d4b16530f89bc99ea6a0cf1e0f30ba5 (patch)
tree3f802ac49b6bb946dff292a95aab8417b7117204 /packages
parentdf0de087c6c972d185fd89af2f207b74204839cc (diff)
downloadpfsense-packages-dbe1ea082d4b16530f89bc99ea6a0cf1e0f30ba5.tar.gz
pfsense-packages-dbe1ea082d4b16530f89bc99ea6a0cf1e0f30ba5.tar.bz2
pfsense-packages-dbe1ea082d4b16530f89bc99ea6a0cf1e0f30ba5.zip
Remove some system calls
Fix config file
Diffstat (limited to 'packages')
-rw-r--r--packages/stunnel.xml14
1 files changed, 6 insertions, 8 deletions
diff --git a/packages/stunnel.xml b/packages/stunnel.xml
index a9e9b36d..1fa6fbb3 100644
--- a/packages/stunnel.xml
+++ b/packages/stunnel.xml
@@ -72,14 +72,12 @@
</field>
</fields>
<custom_php_install_command>
- system("mkdir /usr/local/etc/stunnel 2>/dev/null");
- system("mkdir /var/tmp/stunnel 2>/dev/null");
+ safe_mkdir("/usr/local/etc/stunnel");
system("/usr/bin/openssl req -new -x509 -days 365 -nodes -out /usr/local/etc/stunnel/stunnel.pem -keyout /usr/local/etc/stunnel/stunnel.pem 2>/dev/null");
- system("chmod a-r /usr/local/etc/stunnel/stunnel.pem");
- system("chmod u+r /usr/local/etc/stunnel/stunnel.pem");
- system("mkdir -p /var/tmp/stunnel/var/tmp");
- system("chmod a+rw /var/tmp/stunnel/var/tmp/.");
- system("mv /usr/local/etc/rc.d/stunnel.sh.sample /usr/local/etc/rc.d/stunnel.sh");
+ chmod("/usr/local/etc/stunnel/stunnel.pem", 600);
+ make_dirs("/var/tmp/stunnel/var/tmp");
+ chmod("/var/tmp/stunnel/var/tmp/", 1777);
+ copy("/usr/local/etc/rc.d/stunnel.sh.sample", "/usr/local/etc/rc.d/stunnel.sh");
chmod("/usr/local/etc/rc.d/stunnel.sh", 0555);
</custom_php_install_command>
<custom_php_deinstall_command>
@@ -90,7 +88,7 @@
conf_mount_rw();
config_lock();
$fout = fopen("/usr/local/etc/stunnel/stunnel.conf","w");
- fwrite($fout, "cert = /usr/local/etc/stunnel/mail.pem \n");
+ fwrite($fout, "cert = /usr/local/etc/stunnel/stunnel.pem \n");
fwrite($fout, "chroot = /var/tmp/stunnel \n");
fwrite($fout, "setuid = stunnel \n");
fwrite($fout, "setgid = stunnel \n");