mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-05-18 21:46:20 +00:00
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
parent
2a1179c429
commit
bb87d3fa37
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user