From 5719f2713a8ce512d0361a5c0bc4d0e878117469 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 4 Feb 2014 09:27:45 +0100 Subject: ulogd: add carriage return as separator If the file is in DOS mode, the string coming from config file parsing are containing the carriage return. The result is that string are not correct and the parsing of confuguration file is failling. --- src/conffile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/conffile.c b/src/conffile.c index b8e82a8..66769de 100644 --- a/src/conffile.c +++ b/src/conffile.c @@ -146,7 +146,7 @@ int config_parse_file(const char *section, struct config_keyset *kset) return -ERRTOOLONG; } - if (!(wordend = get_word(line, " \t\n[]", (char *) wordbuf))) + if (!(wordend = get_word(line, " \t\n\r[]", (char *) wordbuf))) continue; pr_debug("word: \"%s\"\n", wordbuf); if (!strcmp(wordbuf, section)) { @@ -178,7 +178,7 @@ int config_parse_file(const char *section, struct config_keyset *kset) return -ERRTOOLONG; } - if (!(wordend = get_word(line, " =\t\n", (char *) &wordbuf))) + if (!(wordend = get_word(line, " =\t\n\r", (char *) &wordbuf))) continue; if (wordbuf[0] == '[' ) { @@ -195,7 +195,7 @@ int config_parse_file(const char *section, struct config_keyset *kset) continue; } - wordend = get_word(wordend, " =\t\n", (char *) &wordbuf); + wordend = get_word(wordend, " =\t\n\r", (char *) &wordbuf); args = (char *)&wordbuf; if (ce->hit && !(ce->options & CONFIG_OPT_MULTI)) -- cgit v1.2.3