1 Star 0 Fork 38

zhoujing/rsyslog

forked from src-openEuler/rsyslog 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
backport-core-bugfix-local-hostname-invalid-if-no-global-config-object-given.patch 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
t.feng 提交于 2022-12-27 16:24 . sync PR-88
From e2beca531157a4c0a27bcdda689bc53373e305b3 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards <rgerhards@adiscon.com>
Date: Thu, 20 Oct 2022 18:08:11 +0200
Subject: [PATCH] core bugfix: local hostname invalid if no global() config
object given
The local hostname is invalidly set to "[localhost]" on rsyslog startup
if no global() config object is present in rsyslog.conf. Sending a HUP
corrects the hostname.
This is a regression from ba00a9f25293f
closes https://github.com/rsyslog/rsyslog/issues/4975,
closes https://github.com/rsyslog/rsyslog/issues/4825From cfe12d3df739adc6e583e3d4dd798f492b0aa17e Mon Sep 17 00:00:00 2001
Conflict:NA
Reference:https://github.com/rsyslog/rsyslog/commit/e2beca531157a4c0a27bcdda689bc53373e305b3
---
runtime/glbl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/runtime/glbl.c b/runtime/glbl.c
index ff11419..71c3989 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -1567,6 +1567,7 @@ glblDoneLoadCnf(void)
stddbg = -1;
}
+finalize_it:
/* we have now read the config. We need to query the local host name now
* as it was set by the config.
*
@@ -1575,8 +1576,7 @@ glblDoneLoadCnf(void)
* are taken from that queue, the hostname will be adapted.
*/
queryLocalHostname();
-
-finalize_it: RETiRet;
+ RETiRet;
}
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zj94/rsyslog.git
git@gitee.com:zj94/rsyslog.git
zj94
rsyslog
rsyslog
master

搜索帮助