[oe-commits] [meta-openembedded] 10/97: snort: fix for snort.conf

git at git.openembedded.org git at git.openembedded.org
Thu Sep 21 09:58:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch pyro-next
in repository meta-openembedded.

commit bb87d3fa37f7504ea85ea9091cc62608bca15859
Author: Jackie Huang <jackie.huang at windriver.com>
AuthorDate: Mon Jun 26 15:04:59 2017 +0800

    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 at windriver.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)

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 57a04f2..dfd6ba9 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
@@ -57,6 +57,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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list