[prev in list] [next in list] [prev in thread] [next in thread]
List: syslog-ng
Subject: [syslog-ng] [PATCH 1/2] pdbtool: Bail out on errors even if
From: Gergely Nagy <algernon () balabit ! hu>
Date: 2011-10-31 17:16:11
Message-ID: 1320081372-8180-1-git-send-email-algernon () balabit ! hu
[Download RAW message or body]
When run with the --validate flag, and an error is detected, short
circuit to the next file, instead of running the rest of the
validation with garbled data.
Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
---
modules/dbparser/pdbtool.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/dbparser/pdbtool.c b/modules/dbparser/pdbtool.c
index 13bc7d4..c2f9117 100644
--- a/modules/dbparser/pdbtool.c
+++ b/modules/dbparser/pdbtool.c
@@ -694,12 +694,14 @@ pdbtool_test(int argc, char *argv[])
{
fprintf(stderr, "%s: Unable to detect patterndb version, please write \
the <patterndb> tag on a single line\n", argv[arg_pos]); failed_to_validate = TRUE;
+ continue;
}
g_snprintf(cmd, sizeof(cmd), "xmllint --noout --nonet --schema \
%s/patterndb-%d.xsd %s", PATH_XSDDIR, version, argv[arg_pos]); if (system(cmd) != 0)
{
fprintf(stderr, "%s: xmllint returned an error, the executed command \
was: %s", argv[arg_pos], cmd); failed_to_validate = TRUE;
+ continue;
}
}
--
1.7.7.1
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic