my private gentoo overlay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.6 KiB

From 612f1d85dd59fc39b124392df38586769ebc8add Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Fri, 11 Mar 2016 10:00:59 +0100
Subject: [PATCH] Log Linux core_init failures as normal error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Opening Linux conntracking table file failure for different reason than
missing the file is fatal for deamon initizalization. But the failure
was logged inly in debugging build.
This patch makes the fatal error visible in normal log.
https://bugzilla.redhat.com/show_bug.cgi?id=1316308
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/kernel/linux.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/kernel/linux.c b/src/kernel/linux.c
index 8bf265f..9103dbf 100644
--- a/src/kernel/linux.c
+++ b/src/kernel/linux.c
@@ -73,21 +73,21 @@ bool core_init(void) {
masq_fp = fopen(MASQFILE, "r");
if (masq_fp == NULL) {
if (errno != ENOENT) {
- debug("fopen: %s: %s", MASQFILE, strerror(errno));
+ o_log(NORMAL, "fopen: %s: %s", MASQFILE, strerror(errno));
return false;
}
masq_fp = fopen(CONNTRACK, "r");
if (masq_fp == NULL) {
if (errno != ENOENT) {
- debug("fopen: %s: %s", CONNTRACK, strerror(errno));
+ o_log(NORMAL, "fopen: %s: %s", CONNTRACK, strerror(errno));
return false;
}
masq_fp = fopen(NFCONNTRACK, "r");
if (masq_fp == NULL) {
if (errno != ENOENT) {
- debug("fopen: %s: %s", NFCONNTRACK, strerror(errno));
+ o_log(NORMAL, "fopen: %s: %s", NFCONNTRACK, strerror(errno));
return false;
}
masq_fp = fopen("/dev/null", "r");
--
2.5.0