From 89e3801c0b79e3a5f059b8f367dad0589358eade Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Tue, 11 Aug 2015 18:39:49 -0400 Subject: Need to use exec_command() since we want output back from execution. --- config/snort/snort_defs.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config/snort') diff --git a/config/snort/snort_defs.inc b/config/snort/snort_defs.inc index 3f5c82e5..aa2d640d 100644 --- a/config/snort/snort_defs.inc +++ b/config/snort/snort_defs.inc @@ -51,11 +51,11 @@ if (!defined("SNORT_BIN_VERSION")) { // Grab the Snort binary version programmatically $snortver = array(); $snortbindir = SNORT_PBI_BINDIR; - mwexec("{$snortbindir}/snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26", $snortver); - if (!empty($snortver[0])) - define("SNORT_BIN_VERSION", $snortver[0]); + $snortver = exec_command("{$snortbindir}/snort -V 2>&1 |/usr/bin/grep Version | /usr/bin/cut -c20-26"); + if (!empty($snortver)) + define("SNORT_BIN_VERSION", $snortver); else - define("SNORT_BIN_VERSION", "2.9.7.3"); + define("SNORT_BIN_VERSION", ""); } if (!defined("SNORT_SID_MODS_PATH")) define('SNORT_SID_MODS_PATH', "{$g['vardb_path']}/snort/sidmods/"); -- cgit v1.2.3