diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-30 23:14:56 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-30 23:14:56 +0000 |
commit | f2d420bb96d14d2b1e2d45d8ca3fa81afa13f871 (patch) | |
tree | cdeae879209bd794eb031fa903781e65efaece19 /packages/snort | |
parent | 454caeb9c329afebdd5c238f577fb470951044a6 (diff) | |
download | pfsense-packages-f2d420bb96d14d2b1e2d45d8ca3fa81afa13f871.tar.gz pfsense-packages-f2d420bb96d14d2b1e2d45d8ca3fa81afa13f871.tar.bz2 pfsense-packages-f2d420bb96d14d2b1e2d45d8ca3fa81afa13f871.zip |
Use conf_mount_rw() and conf_mount_ro()
Diffstat (limited to 'packages/snort')
-rw-r--r-- | packages/snort/snort.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc index 19660579..8773cac6 100644 --- a/packages/snort/snort.inc +++ b/packages/snort/snort.inc @@ -35,6 +35,7 @@ if($config['installedpackages']['snort']) function sync_package_snort() { global $config, $g, $snort_conf_file; + conf_mount_rw(); exec("/bin/mkdir -p /usr/local/etc/snort"); exec("/bin/mkdir -p /var/log/snort"); exec("/bin/cp /usr/local/etc/snort/unicode.map-sample /usr/local/etc/snort/unicode.map"); @@ -84,6 +85,7 @@ function sync_package_snort() { create_snort_conf(); /* start snort service */ + conf_mount_ro(); start_service("snort"); } @@ -91,6 +93,7 @@ function create_snort_conf() { global $config, $g, $snort_conf_file; /* write out snort.conf */ $snort_conf_text = generate_snort_conf(); + conf_mount_rw(); $conf = fopen($snort_conf_file, "w"); if(!$conf) { log_error("Could not open {$snort_conf_file} for writing."); @@ -98,10 +101,12 @@ function create_snort_conf() { } fwrite($conf, $snort_conf_text); fclose($conf); + conf_mount_ro(); } function generate_snort_conf() { global $config, $g, $snort_conf_file; + conf_mount_rw(); /* obtain external interface */ /* XXX: make multi wan friendly */ $snort_ext_int = $config['installedpackages']['snort']['config'][0]['iface_array'][0]; @@ -197,6 +202,8 @@ function generate_snort_conf() { $selected_rules_sections .= "include \$RULE_PATH/{$enabled_item}\n"; } + conf_mount_ro(); + /* build snort configuration file */ $snort_conf_text = <<<EOD |