summaryrefslogtreecommitdiffstats
path: root/runtime/glbl.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-12-08 15:42:47 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2008-12-08 15:42:47 +0100
commit60b8ce14bf33e76237cf82dd1f68acc750e64316 (patch)
treed237ae8806139dfdfcd466b99d67244bc84a509c /runtime/glbl.c
parent128edc1598a13c894fe3853673d1231b9feafc39 (diff)
downloadrsyslog-60b8ce14bf33e76237cf82dd1f68acc750e64316.tar.gz
rsyslog-60b8ce14bf33e76237cf82dd1f68acc750e64316.tar.xz
rsyslog-60b8ce14bf33e76237cf82dd1f68acc750e64316.zip
added $PreserveFQDN config file directive
Enables to use FQDNs in sender names where the legacy default
Diffstat (limited to 'runtime/glbl.c')
-rw-r--r--runtime/glbl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/glbl.c b/runtime/glbl.c
index 2a6bfb11..d06c88ff 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -53,6 +53,7 @@ DEFobjStaticHelpers
static uchar *pszWorkDir = NULL;
static int bOptimizeUniProc = 1; /* enable uniprocessor optimizations */
static int bHUPisRestart = 1; /* should SIGHUP cause a full system restart? */
+static int bPreserveFQDN = 0; /* should FQDNs always be preserved? */
static int iMaxLine = 2048; /* maximum length of a syslog message */
static int iDefPFFamily = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */
static int bDropMalPTRMsgs = 0;/* Drop messages which have malicious PTR records during DNS lookup */
@@ -88,6 +89,7 @@ static dataType Get##nameFunc(void) \
}
SIMP_PROP(OptimizeUniProc, bOptimizeUniProc, int)
+SIMP_PROP(PreserveFQDN, bPreserveFQDN, int)
SIMP_PROP(HUPisRestart, bHUPisRestart, int)
SIMP_PROP(MaxLine, iMaxLine, int)
SIMP_PROP(DefPFFamily, iDefPFFamily, int) /* note that in the future we may check the family argument */
@@ -178,6 +180,7 @@ CODESTARTobjQueryInterface(glbl)
pIf->Set##name = Set##name;
SIMP_PROP(MaxLine);
SIMP_PROP(OptimizeUniProc);
+ SIMP_PROP(PreserveFQDN);
SIMP_PROP(HUPisRestart);
SIMP_PROP(DefPFFamily);
SIMP_PROP(DropMalPTRMsgs);
@@ -224,6 +227,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
bDropMalPTRMsgs = 0;
bOptimizeUniProc = 1;
bHUPisRestart = 1;
+ bPreserveFQDN = 0;
return RS_RET_OK;
}
@@ -245,6 +249,7 @@ BEGINAbstractObjClassInit(glbl, 1, OBJ_IS_CORE_MODULE) /* class, version */
CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdrivercertfile", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvrCertFile, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"optimizeforuniprocessor", 0, eCmdHdlrBinary, NULL, &bOptimizeUniProc, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"hupisrestart", 0, eCmdHdlrBinary, NULL, &bHUPisRestart, NULL));
+ CHKiRet(regCfSysLineHdlr((uchar *)"preservefqdn", 0, eCmdHdlrBinary, NULL, &bPreserveFQDN, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, NULL));
ENDObjClassInit(glbl)