From: Victor Julien Date: Thu, 30 Aug 2018 07:11:07 +0000 (+0200) Subject: rules: hide 'template' from --list-keywords X-Git-Tag: suricata-4.1.0-rc2~103 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af6f52cc097495950250bc6fedd179e4d1d9215b;p=thirdparty%2Fsuricata.git rules: hide 'template' from --list-keywords --- diff --git a/src/detect-engine-register.c b/src/detect-engine-register.c index db6f5e798a..c2b961903a 100644 --- a/src/detect-engine-register.c +++ b/src/detect-engine-register.c @@ -296,7 +296,7 @@ void SigTableList(const char *keyword) for (i = 0; i < size; i++) { const char *name = sigmatch_table[i].name; if (name != NULL && strlen(name) > 0) { - if (name[0] == '_') + if (name[0] == '_' || strcmp(name, "template") == 0) continue; if (sigmatch_table[i].flags & SIGMATCH_NOT_BUILT) { @@ -314,7 +314,7 @@ void SigTableList(const char *keyword) if (sigmatch_table[i].flags & SIGMATCH_NOT_BUILT) { continue; } - if (name[0] == '_') + if (name[0] == '_' || strcmp(name, "template") == 0) continue; printf("%s;", name); @@ -336,7 +336,7 @@ void SigTableList(const char *keyword) for (i = 0; i < size; i++) { const char *name = sigmatch_table[i].name; if (name != NULL && strlen(name) > 0) { - if (name[0] == '_') + if (name[0] == '_' || strcmp(name, "template") == 0) continue; printf("%s:\n", sigmatch_table[i].name); SigMultilinePrint(i, "\t");