From af35de6774ebaf1f26c078217c342627403375c0 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 31 Jul 2007 16:59:39 +0000 Subject: - $ResetConfigVariables now also works vir the table-driven sytem. However, I need to fix an issue with loading default settings when syslogd is started or HUPed --- omfile.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'omfile.c') diff --git a/omfile.c b/omfile.c index 3bb7f817..e1bba987 100644 --- a/omfile.c +++ b/omfile.c @@ -738,6 +738,25 @@ CODESTARTparseSelectorAct ENDparseSelectorAct +/* Reset config variables for this module to default values. + * rgerhards, 2007-07-17 + */ +static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal) +{ + fileUID = -1; + fileGID = -1; + dirUID = -1; + dirGID = -1; + bFailOnChown = 1; + iDynaFileCacheSize = 10; + fCreateMode = 0644; + fDirCreateMode = 0644; + bCreateDirs = 1; + + return RS_RET_OK; +} + + BEGINqueryEtryPt CODESTARTqueryEtryPt CODEqueryEtryPt_STD_OMOD_QUERIES @@ -757,6 +776,7 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(omsdRegCFSLineHdlr((uchar *)"filecreatemode", eCmdHdlrFileCreateMode, NULL, &fCreateMode)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"createdirs", eCmdHdlrBinary, NULL, &bCreateDirs)); CHKiRet(omsdRegCFSLineHdlr((uchar *)"failonchownfailure", eCmdHdlrBinary, NULL, &bFailOnChown)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", eCmdHdlrCustomHandler, resetConfigVariables, NULL)); ENDmodInit /* -- cgit