aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2017-06-26 15:04:59 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2017-06-28 10:29:48 -0400
commitce91bef219313fbeb872e67a4cccc5ec2bd0d7a3 (patch)
tree116f8561801f34c40f0846ddc0472ab855aba932 /meta-networking/recipes-connectivity
parent841bb94ce8bfe62515e266c346752c60ce3c9b1b (diff)
downloadmeta-openembedded-contrib-ce91bef219313fbeb872e67a4cccc5ec2bd0d7a3.tar.gz
snort: fix for snort.conf
The /etc/snort/snort.conf doesn't work since there are hardcoded paths and lib names, and it tries to include many rules that are not provided. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-connectivity')
-rw-r--r--meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb b/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
index e189b0f56d..2034b85fb5 100644
--- a/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
+++ b/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb
@@ -58,6 +58,17 @@ do_install_append() {
for i in map config conf dtd; do
cp ${S}/etc/*.$i ${D}${sysconfdir}/snort/
done
+
+ # fix the hardcoded path and lib name
+ # comment out the rules that are not provided
+ sed -i -e 's#/usr/local/lib#${libdir}#' \
+ -e 's#\.\./\(.*rules\)#${sysconfdir}/snort/\1#' \
+ -e 's#\(libsf_engine.so\)#\1.0#' \
+ -e 's/^\(include $RULE_PATH\)/#\1/' \
+ -e 's/^\(dynamicdetection\)/#\1/' \
+ -e '/preprocessor reputation/,/blacklist/ s/^/#/' \
+ ${D}${sysconfdir}/snort/snort.conf
+
cp ${S}/preproc_rules/*.rules ${D}${sysconfdir}/snort/preproc_rules/
install -m 755 ${WORKDIR}/snort.init ${D}${sysconfdir}/init.d/snort
mkdir -p ${D}${localstatedir}/log/snort