aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev/snort.inc
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2009-12-20 11:16:38 -0800
committerrobiscool <robrob2626@yahoo.com>2009-12-20 11:17:15 -0800
commitee65b76ebb2fc0ba3446381995aa6dadbb095edc (patch)
treefead73fd40a61bcf33782aeb4247a2f84a1b232d /config/snort-dev/snort.inc
parent6102105a07880d0dafb02c33019e23fe9491ec1c (diff)
downloadpfsense-packages-ee65b76ebb2fc0ba3446381995aa6dadbb095edc.tar.gz
pfsense-packages-ee65b76ebb2fc0ba3446381995aa6dadbb095edc.tar.bz2
pfsense-packages-ee65b76ebb2fc0ba3446381995aa6dadbb095edc.zip
snort-dev, adjust xml, snort.inc and paths
Diffstat (limited to 'config/snort-dev/snort.inc')
-rw-r--r--config/snort-dev/snort.inc30
1 files changed, 28 insertions, 2 deletions
diff --git a/config/snort-dev/snort.inc b/config/snort-dev/snort.inc
index ab93a335..bb4e201e 100644
--- a/config/snort-dev/snort.inc
+++ b/config/snort-dev/snort.inc
@@ -429,7 +429,32 @@ function snort_rules_up_install_cron($should_install) {
}
/* make sure this func on writes to files and does not start snort */
-function sync_package_snort()
+function sync_snort_package()
+{
+ global $config, $g;
+ conf_mount_rw();
+
+
+
+ /* all new files are for the user snort nologin */
+ if(!file_exists("/var/log/snort"))
+ {
+ exec("/bin/mkdir -p /var/log/snort");
+ }
+
+ exec("/usr/sbin/chown -R snort:snort /var/log/snort");
+ exec("/usr/sbin/chown -R snort:snort /usr/local/etc/snort");
+ exec("/usr/sbin/chown -R snort:snort /usr/local/lib/snort");
+ exec("/bin/chmod -R 755 /var/log/snort");
+ exec("/bin/chmod -R 755 /usr/local/etc/snort");
+ exec("/bin/chmod -R 755 /usr/local/lib/snort");
+
+ conf_mount_ro();
+}
+
+
+/* make sure this func on writes to files and does not start snort */
+function sync_snort_package_all()
{
global $config, $g, $id, $if_real, $interface_fake;
conf_mount_rw();
@@ -904,7 +929,8 @@ function snort_deinstall()
function snort_rules_up_deinstall_cron($should_install) {
global $config, $g;
-
+ conf_mount_rw();
+
$is_installed = false;
if(!$config['cron']['item'])