summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-28 12:16:18 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-28 12:16:18 +0200
commit10e06c833a55b972c0e4943eea3223f21ad73736 (patch)
treed7013fc4235eb7a235d514686c712f7958316d69
parent76e4eb29d4343d11cb2e4b354f7d7d14df707b7a (diff)
downloadrsyslog-10e06c833a55b972c0e4943eea3223f21ad73736.tar.gz
rsyslog-10e06c833a55b972c0e4943eea3223f21ad73736.tar.xz
rsyslog-10e06c833a55b972c0e4943eea3223f21ad73736.zip
added $DefaultNetstreamDriver config directive
-rw-r--r--doc/rsyslog_conf.html1
-rw-r--r--runtime/glbl.c7
-rw-r--r--runtime/netstrms.c1
3 files changed, 5 insertions, 4 deletions
diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html
index 4dcef903..e39cfe13 100644
--- a/doc/rsyslog_conf.html
+++ b/doc/rsyslog_conf.html
@@ -129,6 +129,7 @@ worker threads, default 1, recommended 1</li>
<li><a href="rsconf1_debugprintmodulelist.html">$DebugPrintModuleList</a></li>
<li><a href="rsconf1_debugprinttemplatelist.html">$DebugPrintTemplateList</a></li>
+<li>$DefaultNetstreamDriver &lt;drivername&gt;, default lmnsd_ptcp, use lmnsd_gtls for TLS protection</li>
<li><a href="rsconf1_dircreatemode.html">$DirCreateMode</a></li>
<li><a href="rsconf1_dirgroup.html">$DirGroup</a></li>
<li><a href="rsconf1_dirowner.html">$DirOwner</a></li>
diff --git a/runtime/glbl.c b/runtime/glbl.c
index 787b6ab7..7b584d30 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -40,9 +40,7 @@
/* some defaults */
#ifndef DFLT_NETSTRM_DRVR
-// TESTING ONLY# define DFLT_NETSTRM_DRVR ((uchar*)"lmnsd_ptcp")
-#warning "define must be restored for non-testing!"
-# define DFLT_NETSTRM_DRVR ((uchar*)"lmnsd_gtls")
+# define DFLT_NETSTRM_DRVR ((uchar*)"lmnsd_ptcp")
#endif
/* static data */
@@ -120,7 +118,7 @@ GetWorkDir(void)
static uchar*
GetDfltNetstrmDrvr(void)
{
- return(pszDfltNetstrmDrvr == NULL ? DFLT_NETSTRM_DRVR : pszWorkDir);
+ return(pszDfltNetstrmDrvr == NULL ? DFLT_NETSTRM_DRVR : pszDfltNetstrmDrvr);
}
@@ -185,6 +183,7 @@ BEGINAbstractObjClassInit(glbl, 1, OBJ_IS_CORE_MODULE) /* class, version */
/* register config handlers (TODO: we need to implement a way to unregister them) */
CHKiRet(regCfSysLineHdlr((uchar *)"workdirectory", 0, eCmdHdlrGetWord, NULL, &pszWorkDir, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"dropmsgswithmaliciousdnsptrrecords", 0, eCmdHdlrBinary, NULL, &bDropMalPTRMsgs, NULL));
+ CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdriver", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvr, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, NULL));
ENDObjClassInit(glbl)
diff --git a/runtime/netstrms.c b/runtime/netstrms.c
index 661234e4..caded8a4 100644
--- a/runtime/netstrms.c
+++ b/runtime/netstrms.c
@@ -61,6 +61,7 @@ loadDrvr(netstrms_t *pThis)
pDrvrName = pThis->pDrvrName;
if(pDrvrName == NULL) /* if no drvr name is set, use system default */
pDrvrName = glbl.GetDfltNetstrmDrvr();
+RUNLOG_VAR("%s", pDrvrName);
pThis->Drvr.ifVersion = nsdCURR_IF_VERSION;
/* The pDrvrName+2 below is a hack to obtain the object name. It