diff options
author | M0Rf30 | 2020-06-01 13:38:31 +0200 |
---|---|---|
committer | M0Rf30 | 2020-06-01 13:38:31 +0200 |
commit | e7937ea6ad846155af2d9799e478c7cd9736f098 (patch) | |
tree | a66cd51aa95bee95fca8b12393c2caa4823694b8 | |
parent | 7fd944786f4a4f53b655fe4cf865daf0718fe67a (diff) | |
download | aur-e7937ea6ad846155af2d9799e478c7cd9736f098.tar.gz |
snort: add snort-2.9.15.1-fno-common.patch
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | snort-2.9.15.1-fno-common.patch | 106 |
3 files changed, 121 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = snort pkgdesc = A lightweight network intrusion detection system. pkgver = 2.9.16 - pkgrel = 1 + pkgrel = 2 url = http://www.snort.org install = snort.install arch = i686 @@ -36,9 +36,11 @@ pkgbase = snort source = https://www.snort.org/downloads/snort/snort-2.9.16.tar.gz source = http://rules.emergingthreats.net/open/snort-2.9.0/emerging.rules.tar.gz source = snort@.service + source = snort-2.9.15.1-fno-common.patch md5sums = 1cec58babaea3420014d61a93e6e1545 md5sums = SKIP md5sums = a847030a34396e6b2d1cacd272ad42da + md5sums = 101bc0617d1547b14359ad884ac70541 pkgname = snort @@ -4,10 +4,11 @@ # Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com> # Contributor: dorphell <dorphell@archlinux.org> # Contributor: Gregor Ibic <gregor.ibic@intelicom.si> +# Contributor: Netboy3 pkgname=snort pkgver=2.9.16 -pkgrel=1 +pkgrel=2 pkgdesc='A lightweight network intrusion detection system.' arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64' 'arm') url='http://www.snort.org' @@ -24,8 +25,14 @@ install='snort.install' source=("https://www.snort.org/downloads/snort/${pkgname}-${pkgver}.tar.gz" "http://rules.emergingthreats.net/open/${pkgname}-2.9.0/emerging.rules.tar.gz" 'snort@.service' + 'snort-2.9.15.1-fno-common.patch' ) +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i ../snort-2.9.15.1-fno-common.patch +} + build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr \ @@ -47,6 +54,7 @@ package() { install -d -m755 "${pkgdir}/var/log/snort" install -D -m644 etc/{*.conf*,*.map} "${pkgdir}/etc/snort/" + cd "${srcdir}/${pkgname}-${pkgver}" # init service file install -D -m644 ../snort@.service $pkgdir/usr/lib/systemd/system/snort@.service @@ -59,5 +67,6 @@ package() { } md5sums=('1cec58babaea3420014d61a93e6e1545' - 'SKIP' - 'a847030a34396e6b2d1cacd272ad42da') + 'SKIP' + 'a847030a34396e6b2d1cacd272ad42da' +'101bc0617d1547b14359ad884ac70541') diff --git a/snort-2.9.15.1-fno-common.patch b/snort-2.9.15.1-fno-common.patch new file mode 100644 index 000000000000..9fe39933ddfe --- /dev/null +++ b/snort-2.9.15.1-fno-common.patch @@ -0,0 +1,106 @@ +--- a/src/preprocessors/Stream6/stream_paf.h ++++ b/src/preprocessors/Stream6/stream_paf.h +@@ -68,12 +68,14 @@ + uint16_t s5_paf_port_registration_all (void* pv, uint16_t port, bool c2s, bool flush); + uint16_t s5_paf_service_registration (void* pv, uint16_t service, bool c2s, bool flush); + +-enum FlushMode ++typedef enum + { + FLUSH_MODE_NORMAL = 0, + FLUSH_MODE_PRE_DISCARD, + FLUSH_MODE_DISCARD +-}FlushMode; ++} FlushMode_t; ++ ++extern FlushMode_t FlushMode; + + typedef struct { + void* user[MAX_PAF_USER]; // arbitrary user data +--- a/src/sfutil/util_jsnorm.h ++++ b/src/sfutil/util_jsnorm.h +@@ -42,5 +42,7 @@ + uint16_t alerts; + }JSState; + ++extern int hex_lookup[256]; ++ + int JSNormalizeDecode(char *, uint16_t , char *, uint16_t destlen, char **, int *, JSState *, uint8_t *); + void InitJSNormLookupTable(void); +--- a/src/preprocessors/spp_session.h ++++ b/src/preprocessors/spp_session.h +@@ -28,6 +28,8 @@ + #include "decode.h" + #include "session_common.h" + ++extern PreprocStats sessionPerfStats; ++ + /* list of function prototypes for this preprocessor */ + void SetupSessionManager(void); + void SessionReload(struct _SessionCache* lws_cache, uint32_t max_sessions, +--- a/src/preprocessors/spp_httpinspect.c ++++ b/src/preprocessors/spp_httpinspect.c +@@ -161,7 +161,6 @@ + MemPool *http_mempool = NULL; + MemPool *mime_decode_mempool = NULL; + MemPool *mime_log_mempool = NULL; +-int hex_lookup[256]; + int valid_lookup[256]; + + char** xffFields = NULL; +--- a/src/detection-plugins/sp_session.c ++++ b/src/detection-plugins/sp_session.c +@@ -80,7 +80,7 @@ + #include "snort.h" + #include "profiler.h" + #ifdef PERF_PROFILING +-PreprocStats sessionPerfStats; ++PreprocStats sp_sessionPerfStats; + extern PreprocStats ruleOTNEvalPerfStats; + #endif + +@@ -149,7 +149,7 @@ + /* map the keyword to an initialization/processing function */ + RegisterRuleOption("session", SessionInit, NULL, OPT_TYPE_LOGGING, NULL); + #ifdef PERF_PROFILING +- RegisterPreprocessorProfile("session", &sessionPerfStats, 3, &ruleOTNEvalPerfStats, NULL); ++ RegisterPreprocessorProfile("session", &sp_sessionPerfStats, 3, &ruleOTNEvalPerfStats, NULL); + #endif + DEBUG_WRAP(DebugMessage(DEBUG_PLUGIN, "Plugin: Session Setup\n");); + } +@@ -287,7 +287,7 @@ + FILE *session; /* session file ptr */ + PROFILE_VARS; + +- PREPROC_PROFILE_START(sessionPerfStats); ++ PREPROC_PROFILE_START(sp_sessionPerfStats); + + /* if there's data in this packet */ + if(p != NULL) +@@ -298,7 +298,7 @@ + + if(session == NULL) + { +- PREPROC_PROFILE_END(sessionPerfStats); ++ PREPROC_PROFILE_END(sp_sessionPerfStats); + return DETECTION_OPTION_MATCH; + } + +@@ -308,7 +308,7 @@ + } + } + +- PREPROC_PROFILE_END(sessionPerfStats); ++ PREPROC_PROFILE_END(sp_sessionPerfStats); + return DETECTION_OPTION_MATCH; + } + +--- a/src/detection-plugins/sp_session.h ++++ b/src/detection-plugins/sp_session.h +@@ -29,5 +29,6 @@ + void SetupSession(void); + uint32_t SessionHash(void *d); + int SessionCompare(void *l, void *r); ++extern PreprocStats sp_sessionPerfStats; + + #endif /* __SP_SESSION_H__ */ |