From bbab0f99872a58dff98fd0c8eb300a72b5833030 Mon Sep 17 00:00:00 2001 From: Pablo Rincon Date: Fri, 30 Jul 2010 14:30:16 +0200 Subject: [PATCH] Set default gid to 1 on Sig init --- src/detect-parse.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/detect-parse.c b/src/detect-parse.c index 4cb3510ebc..3a2e634711 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -1244,6 +1244,9 @@ Signature *SigInit(DetectEngineCtx *de_ctx, char *sigstr) { if (sig == NULL) goto error; + /* default gid to 1 */ + sig->gid = 1; + if (SigParse(de_ctx, sig, sigstr, SIG_DIREC_NORMAL) < 0) goto error; @@ -1386,6 +1389,8 @@ Signature *SigInitReal(DetectEngineCtx *de_ctx, char *sigstr) { /* XXX one day we will support this the way Snort does, * through classifications.config */ sig->prio = 3; + /* default gid to 1 */ + sig->gid = 1; if (SigParse(de_ctx, sig, sigstr, SIG_DIREC_NORMAL) < 0) goto error;