mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-04 05:04:39 +02:00
Changelog: ========== * src/dynamic-preprocessors/appid/service_plugins/service_ssl.c : Fixed a scenario where SSL traffic was not detected correctly. * src/dynamic-preprocessors/smtp/snort_smtp.c : Fixed a possible memory corruption. * src/dynamic-preprocessors/imap/imap_util.c src/dynamic-preprocessors/pop/pop_util.c src/dynamic-preprocessors/smtp/smtp_util.c src/preprocessors/spp_httpinspect.c : Fixed malformed packet debug engine output. * src/preprocessors/Stream6/snort_stream_tcp.c : Fixed security zones info in intrusion events. * src/dynamic-preprocessors/appid/fw_appid.c : Fixed URL lookup failure. * src/preprocessors/HttpInspect/server/hi_server.c : Fixed a possible memory leak. * src/dynamic-preprocessors/appid/detector_plugins/detector_dns.c src/dynamic-preprocessors/appid/fw_appid.c src/dynamic-preprocessors/appid/fw_appid.h src/dynamic-preprocessors/appid/detector_plugins/service_plugins/service_api.h : Added support for dns root queries and underflow. * src/dynamic-preprocessors/smtp/snort_smtp.c src/Makefile.am src/dynamic-examples/Makefile.am src/dynamic-plugins/sf_dynamic_plugins.c src/dynamic-plugins/sf_dynamic_preprocessor.h src/dynamic-preprocessors/Makefile.am src/dynamic-preprocessors/smtp/snort_smtp.h src/dynamic-preprocessors/smtp/spp_smtp.c src/smtp_api.h : Added support to get extra data from SMTP and HTTP into IPS event. * src/dynamic-preprocessors/appid/detector_plugins/detector_imap.c src/dynamic-preprocessors/appid/detector_plugins/detector_pop3.c : Added support for login success and failure eventing for IMAP and POP3. * src/dynamic-preprocessors/appid/hi_server.c : Added support to handle empty string for SNI/CN/SAN/ORG. Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
112 lines
4.3 KiB
BlitzBasic
112 lines
4.3 KiB
BlitzBasic
DESCRIPTION = "snort - a free lightweight network intrusion detection system for UNIX and Windows."
|
|
HOMEPAGE = "http://www.snort.org/"
|
|
SECTION = "net"
|
|
LICENSE = "GPL-2.0-only"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5"
|
|
|
|
DEPENDS = "xz libpcap libpcre daq libdnet util-linux daq-native libtirpc bison-native"
|
|
|
|
SRC_URI = "https://www.snort.org/downloads/archive/snort/${BP}.tar.gz \
|
|
file://snort.init \
|
|
file://volatiles.99_snort \
|
|
file://0001-libpcap-search-sysroot-for-headers.patch \
|
|
file://fix-host-contamination-when-enable-static-daq.patch \
|
|
file://disable-run-test-program-while-cross-compiling.patch \
|
|
file://configure.in-disable-tirpc-checking-for-fedora.patch \
|
|
"
|
|
SRC_URI[sha256sum] = "29400e13f53b1831e0b8b10ec1224a1cbaa6dc1533a5322a20dd80bb84b4981c"
|
|
|
|
UPSTREAM_CHECK_URI = "https://www.snort.org/downloads"
|
|
UPSTREAM_CHECK_REGEX = "snort-(?P<pver>\d+(\.\d+)+)\.tar"
|
|
|
|
inherit autotools gettext update-rc.d pkgconfig
|
|
|
|
INITSCRIPT_NAME = "snort"
|
|
INITSCRIPT_PARAMS = "defaults"
|
|
|
|
EXTRA_OECONF = " \
|
|
--enable-gre \
|
|
--enable-linux-smp-stats \
|
|
--enable-reload \
|
|
--enable-reload-error-restart \
|
|
--enable-targetbased \
|
|
--enable-static-daq \
|
|
--with-dnet-includes=${STAGING_INCDIR} \
|
|
--with-dnet-libraries=${STAGING_LIBDIR} \
|
|
--with-libpcre-includes=${STAGING_INCDIR} \
|
|
--with-libpcre-libraries=${STAGING_LIBDIR} \
|
|
--with-daq-includes=${STAGING_INCDIR} \
|
|
--with-daq-libraries=${STAGING_LIBDIR} \
|
|
"
|
|
|
|
# if you want to disable it, you need to patch configure.in first
|
|
# AC_CHECK_HEADERS([openssl/sha.h],, SHA_H="no")
|
|
# is called even with --without-openssl-includes
|
|
PACKAGECONFIG ?= "openssl lzma"
|
|
PACKAGECONFIG[openssl] = "--with-openssl-includes=${STAGING_INCDIR} --with-openssl-libraries=${STAGING_LIBDIR}, --without-openssl-includes --without-openssl-libraries, openssl,"
|
|
PACKAGECONFIG[lzma] = "--with-lzma-includes=${STAGING_INCDIR} --with-lzma-libraries=${STAGING_LIBDIR}, --without-lzma-includes --without-lzma-libraries, xz,"
|
|
PACKAGECONFIG[appid] = "--enable-open-appid, --disable-open-appid, luajit, bash"
|
|
|
|
CFLAGS += "-I${STAGING_INCDIR}/tirpc"
|
|
LDFLAGS += " -ltirpc"
|
|
|
|
do_install:append() {
|
|
install -d ${D}${sysconfdir}/snort/rules
|
|
install -d ${D}${sysconfdir}/snort/preproc_rules
|
|
install -d ${D}${sysconfdir}/init.d
|
|
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
|
|
|
|
install -d ${D}${sysconfdir}/default/volatiles
|
|
install -m 0644 ${WORKDIR}/volatiles.99_snort ${D}${sysconfdir}/default/volatiles/99_snort
|
|
|
|
sed -i -e 's|-ffile-prefix-map[^ ]*||g; s|-fdebug-prefix-map[^ ]*||g; s|-fmacro-prefix-map[^ ]*||g; s|${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc
|
|
}
|
|
|
|
pkg_postinst:${PN}() {
|
|
if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
|
|
${sysconfdir}/init.d/populate-volatile.sh update
|
|
fi
|
|
}
|
|
|
|
FILES:${PN} += " \
|
|
${libdir}/snort_dynamicengine/*.so.* \
|
|
${libdir}/snort_dynamicpreprocessor/*.so.* \
|
|
${libdir}/snort_dynamicrules/*.so.* \
|
|
"
|
|
FILES:${PN}-dbg += " \
|
|
${libdir}/snort_dynamicengine/.debug \
|
|
${libdir}/snort_dynamicpreprocessor/.debug \
|
|
${libdir}/snort_dynamicrules/.debug \
|
|
"
|
|
FILES:${PN}-staticdev += " \
|
|
${libdir}/snort_dynamicengine/*.a \
|
|
${libdir}/snort_dynamicpreprocessor/*.a \
|
|
${libdir}/snort_dynamicrules/*.a \
|
|
${libdir}/snort/dynamic_preproc/*.a \
|
|
${libdir}/snort/dynamic_output/*.a \
|
|
"
|
|
FILES:${PN}-dev += " \
|
|
${libdir}/snort_dynamicengine/*.la \
|
|
${libdir}/snort_dynamicpreprocessor/*.la \
|
|
${libdir}/snort_dynamicrules/*.la \
|
|
${libdir}/snort_dynamicengine/*.so \
|
|
${libdir}/snort_dynamicpreprocessor/*.so \
|
|
${libdir}/snort_dynamicrules/*.so \
|
|
${prefix}/src/snort_dynamicsrc \
|
|
"
|