Skip to content

Commit

Permalink
Merge pull request #656 from bmeeks8/pfSense-pkg-snort-4.0_4
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Jul 29, 2019
2 parents 79d3d1b + 73b4609 commit 3cf518d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion security/pfSense-pkg-snort/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= pfSense-pkg-snort
PORTVERSION= 4.0
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -825,5 +825,4 @@ function snort_apply_customizations($snortcfg, $if_real) {
else
$config['installedpackages']['snortglobal']['last_rule_upd_status'] = gettext("success");
$config['installedpackages']['snortglobal']['last_rule_upd_time'] = time();
write_config("Snort pkg: updated status for updated rules package(s) check.", FALSE);
?>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* snort_interface_logs.php
*
* part of pfSense (https://www.pfsense.org)
* Copyright (c) 2006-2018 Rubicon Communications, LLC (Netgate)
* Copyright (c) 2006-2019 Rubicon Communications, LLC (Netgate)
* Copyright (c) 2005 Bill Marquette <bill.marquette@gmail.com>.
* Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
* Copyright (c) 2009 Robert Zelaya Sr. Developer
* Copyright (c) 2014-2018 Bill Meeks
* Copyright (c) 2014-2019 Bill Meeks
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -43,8 +43,8 @@
// Construct a pointer to the instance's logging subdirectory
$snortlogdir = SNORTLOGDIR . "/snort_{$if_real}{$snort_uuid}/";

// Construct a pointer to the PBI_BIN directory
$snortbindir = SNORT_PBI_BINDIR;
// Construct a pointer to the Snort BIN directory
$snortbindir = SNORT_BINDIR;

// Limit all file access to just the currently selected interface's logging subdirectory
$logfile = htmlspecialchars($snortlogdir . basename($_POST['file']));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
$pconfig = $_POST;
else {
$pconfig['snortdownload'] = $config['installedpackages']['snortglobal']['snortdownload'] == "on" ? 'on' : 'off';
$pconfig['oinkmastercode'] = $config['installedpackages']['snortglobal']['oinkmastercode'];
$pconfig['etpro_code'] = $config['installedpackages']['snortglobal']['etpro_code'];
$pconfig['oinkmastercode'] = htmlentities($config['installedpackages']['snortglobal']['oinkmastercode']);
$pconfig['etpro_code'] = htmlentities($config['installedpackages']['snortglobal']['etpro_code']);
$pconfig['emergingthreats'] = $config['installedpackages']['snortglobal']['emergingthreats'] == "on" ? 'on' : 'off';
$pconfig['emergingthreats_pro'] = $config['installedpackages']['snortglobal']['emergingthreats_pro'] == "on" ? 'on' : 'off';
$pconfig['rm_blocked'] = $config['installedpackages']['snortglobal']['rm_blocked'];
$pconfig['autorulesupdate7'] = $config['installedpackages']['snortglobal']['autorulesupdate7'];
$pconfig['rule_update_starttime'] = $config['installedpackages']['snortglobal']['rule_update_starttime'];
$pconfig['rule_update_starttime'] = htmlentities($config['installedpackages']['snortglobal']['rule_update_starttime']);
$pconfig['forcekeepsettings'] = $config['installedpackages']['snortglobal']['forcekeepsettings'] == "on" ? 'on' : 'off';
$pconfig['snortcommunityrules'] = $config['installedpackages']['snortglobal']['snortcommunityrules'] == "on" ? 'on' : 'off';
$pconfig['clearblocks'] = $config['installedpackages']['snortglobal']['clearblocks'] == "on" ? 'on' : 'off';
Expand Down Expand Up @@ -141,8 +141,8 @@
snort_remove_dead_rules();
}

$config['installedpackages']['snortglobal']['oinkmastercode'] = $_POST['oinkmastercode'];
$config['installedpackages']['snortglobal']['etpro_code'] = $_POST['etpro_code'];
$config['installedpackages']['snortglobal']['oinkmastercode'] = trim(html_entity_decode($_POST['oinkmastercode']));
$config['installedpackages']['snortglobal']['etpro_code'] = trim(html_entity_decode($_POST['etpro_code']));

$config['installedpackages']['snortglobal']['rm_blocked'] = $_POST['rm_blocked'];
$config['installedpackages']['snortglobal']['autorulesupdate7'] = $_POST['autorulesupdate7'];
Expand All @@ -154,7 +154,7 @@
$tmp = str_pad($_POST['rule_update_starttime'], 4, "0", STR_PAD_LEFT);
$_POST['rule_update_starttime'] = substr($tmp, 0, 2) . ":" . substr($tmp, -2);
}
$config['installedpackages']['snortglobal']['rule_update_starttime'] = str_pad($_POST['rule_update_starttime'], 4, "0", STR_PAD_LEFT);
$config['installedpackages']['snortglobal']['rule_update_starttime'] = str_pad(html_entity_decode($_POST['rule_update_starttime']), 4, "0", STR_PAD_LEFT);
}

$config['installedpackages']['snortglobal']['forcekeepsettings'] = $_POST['forcekeepsettings'] ? 'on' : 'off';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
global $g, $rebuild_rules;

$snortdir = SNORTDIR;
$snortbindir = SNORT_PBI_BINDIR;
$snortbindir = SNORT_BINDIR;
$rules_map = array();
$categories = array();
$pconfig = array();
Expand Down

0 comments on commit 3cf518d

Please sign in to comment.