summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/omdiscard.c8
-rw-r--r--tools/omfile.c2
-rw-r--r--tools/rsyslogd.828
-rw-r--r--tools/syslogd.c19
4 files changed, 17 insertions, 40 deletions
diff --git a/tools/omdiscard.c b/tools/omdiscard.c
index 182c4b63..15c6ea82 100644
--- a/tools/omdiscard.c
+++ b/tools/omdiscard.c
@@ -35,6 +35,7 @@
#include "syslogd-types.h"
#include "omdiscard.h"
#include "module-template.h"
+#include "errmsg.h"
MODULE_TYPE_OUTPUT
MODULE_TYPE_NOKEEP
@@ -42,6 +43,7 @@ MODULE_TYPE_NOKEEP
/* internal structures
*/
DEF_OMOD_STATIC_DATA
+DEFobjCurrIf(errmsg);
typedef struct _instanceData {
EMPTY_STRUCT
@@ -92,8 +94,10 @@ CODE_STD_STRING_REQUESTparseSelectorAct(0)
p = *pp;
if(*p == '~') {
- /* TODO: check the rest of the selector line - error reporting */
dbgprintf("discard\n");
+ errmsg.LogError(0, RS_RET_DEPRECATED, "warning: ~ action "
+ "is deprecated, consider using the 'stop' "
+ "statement instead");
} else {
iRet = RS_RET_CONFLINE_UNPROCESSED;
}
@@ -103,6 +107,7 @@ ENDparseSelectorAct
BEGINmodExit
CODESTARTmodExit
+ objRelease(errmsg, CORE_COMPONENT);
ENDmodExit
@@ -116,6 +121,7 @@ BEGINmodInit(Discard)
CODESTARTmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
+ CHKiRet(objUse(errmsg, CORE_COMPONENT));
ENDmodInit
/*
* vi:set ai:
diff --git a/tools/omfile.c b/tools/omfile.c
index 8969d16d..c7e0dc25 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -970,7 +970,7 @@ CODESTARTnewActInst
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
}
- tplToUse = (pData->tplName == NULL) ? ustrdup(getDfltTpl()) : pData->tplName;
+ tplToUse = ustrdup((pData->tplName == NULL) ? getDfltTpl() : pData->tplName);
CHKiRet(OMSRsetEntry(*ppOMSR, 0, tplToUse, OMSR_NO_RQD_TPL_OPTS));
if(pData->bDynamicName) {
diff --git a/tools/rsyslogd.8 b/tools/rsyslogd.8
index 6ac30e46..36f29769 100644
--- a/tools/rsyslogd.8
+++ b/tools/rsyslogd.8
@@ -1,7 +1,7 @@
.\" Copyright 2004-2008 Rainer Gerhards and Adiscon for the rsyslog modifications
.\" May be distributed under the GNU General Public License
.\"
-.TH RSYSLOGD 8 "29 July 2008" "Version 3.21.1" "Linux System Administration"
+.TH RSYSLOGD 8 "16 October 2012" "Version 6.4.3" "Linux System Administration"
.SH NAME
rsyslogd \- reliable and extended syslogd
.SH SYNOPSIS
@@ -93,9 +93,6 @@ the error element is ignored. It is tried to parse the rest of the line.
.LP
.SH OPTIONS
-.B Note that in version 3 of rsyslog a number of command line options
-.B have been deprecated and replaced with config file directives. The
-.B -c option controls the backward compatibility mode in use.
.TP
.BI "\-A"
When sending UDP messages, there are potentially multiple paths to
@@ -123,26 +120,9 @@ If neither -4 nor -6 is given,
listens to all configured addresses of the system.
.TP
.BI "\-c " "version"
-Selects the desired backward compatibility mode. It must always be the
-first option on the command line, as it influences processing of the
-other options. To use the rsyslog v3 native interface, specify -c3. To
-use compatibility mode , either do not use -c at all or use
--c<version> where
-.IR version
-is the rsyslog version that it shall be
-compatible with. Using -c0 tells rsyslog to be command-line compatible
-to sysklogd, which is the default if -c is not given.
-.B Please note that rsyslogd issues warning messages if the -c3
-.B command line option is not given.
-This is to alert you that your are running in compatibility
-mode. Compatibility mode interferes with your rsyslog.conf commands and
-may cause some undesired side-effects. It is meant to be used with a
-plain old rsyslog.conf - if you use new features, things become
-messy. So the best advice is to work through this document, convert
-your options and config file and then use rsyslog in native mode. In
-order to aid you in this process, rsyslog logs every
-compatibility-mode config file directive it has generated. So you can
-simply copy them from your logfile and paste them to the config.
+This option has been obsolted and has no function any longer. It is still
+accepted in order not to break existing scripts. However, future versions
+may not support it.
.TP
.B "\-d"
Turns on debug mode. Using this the daemon will not proceed a
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 8ba8edd3..edb546a1 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -219,11 +219,6 @@ struct queuefilenames_s {
uchar *name;
} *queuefilenames = NULL;
-/* global variables for config file state */
-int iCompatibilityMode = 0; /* version we should be compatible with; 0 means sysklogd. It is
- the default, so if no -c<n> option is given, we make ourselvs
- as compatible to sysklogd as possible. */
-/* end global config file state variables */
int MarkInterval = 20 * 60; /* interval between marks in seconds - read-only after startup */
int send_to_all = 0; /* send message to all IPv4/IPv6 addresses */
@@ -249,10 +244,9 @@ static void sighup_handler();
static int usage(void)
{
- fprintf(stderr, "usage: rsyslogd [-c<version>] [-46AdnqQvwx] [-l<hostlist>] [-s<domainlist>]\n"
+ fprintf(stderr, "usage: rsyslogd [-46AdnqQvwx] [-l<hostlist>] [-s<domainlist>]\n"
" [-f<conffile>] [-i<pidfile>] [-N<level>] [-M<module load path>]\n"
" [-u<number>]\n"
- "To run rsyslogd in native mode, use \"rsyslogd -c5 <other options>\"\n\n"
"For further information see http://www.rsyslog.com/doc\n");
exit(1); /* "good" exit - done to terminate usage() */
}
@@ -1833,10 +1827,7 @@ int realMain(int argc, char **argv)
* split of functionality, this is no longer a problem. Thanks to varmofekoj for
* suggesting this algo.
* Note: where we just need to set some flags and can do so without knowledge
- * of other options, we do this during the inital option processing. With later
- * versions (if a dependency on -c option is introduced), we must move that code
- * to other places, but I think it is quite appropriate and saves code to do this
- * only when actually neeeded.
+ * of other options, we do this during the inital option processing.
* rgerhards, 2008-04-04
*/
while((ch = getopt(argc, argv, "46a:Ac:def:g:hi:l:m:M:nN:op:qQr::s:t:T:u:vwx")) != EOF) {
@@ -1867,7 +1858,7 @@ int realMain(int argc, char **argv)
CHKiRet(bufOptAdd(ch, optarg));
break;
case 'c': /* compatibility mode */
- iCompatibilityMode = atoi(optarg);
+ fprintf(stderr, "rsyslogd: error: option -c is no longer supported - ignored");
break;
case 'd': /* debug - must be handled now, so that debug is active during init! */
debugging_on = 1;
@@ -1891,8 +1882,8 @@ int realMain(int argc, char **argv)
if(argc - optind)
usage();
- DBGPRINTF("rsyslogd %s startup, compatibility mode %d, module path '%s', cwd:%s\n",
- VERSION, iCompatibilityMode, glblModPath == NULL ? "" : (char*)glblModPath,
+ DBGPRINTF("rsyslogd %s startup, module path '%s', cwd:%s\n",
+ VERSION, glblModPath == NULL ? "" : (char*)glblModPath,
getcwd(cwdbuf, sizeof(cwdbuf)));
/* we are done with the initial option parsing and processing. Now we init the system. */