|
|
b65758 |
From e62f3e1a46a6599a6b8dc22e9df0ebefe00b7d08 Mon Sep 17 00:00:00 2001
|
|
|
b65758 |
From: jvymazal <jvymazal@redhat.com>
|
|
|
b65758 |
Date: Fri, 13 Jan 2017 12:06:04 +0100
|
|
|
b65758 |
Subject: [PATCH] added obsolete command-line switches for backward
|
|
|
b65758 |
comaptibility (#1)
|
|
|
b65758 |
|
|
|
b65758 |
* added obsolete command-line switches for backward comaptibility
|
|
|
b65758 |
|
|
|
b65758 |
* removed the added warnings since we are not obsoleting any cmd-line opts
|
|
|
b65758 |
|
|
|
b65758 |
Resolves: RHBZ#1403831
|
|
|
b65758 |
---
|
|
|
b65758 |
tools/rsyslogd.c | 49 +++++++++++++++++++------------------------------
|
|
|
b65758 |
1 file changed, 19 insertions(+), 30 deletions(-)
|
|
|
b65758 |
|
|
|
b65758 |
diff --git a/tools/rsyslogd.c b/tools/rsyslogd.c
|
|
|
b65758 |
index b53eeaf..5e3cde2 100644
|
|
|
b65758 |
--- a/tools/rsyslogd.c
|
|
|
b65758 |
+++ b/tools/rsyslogd.c
|
|
|
b65758 |
@@ -1191,6 +1191,15 @@ initAll(int argc, char **argv)
|
|
|
b65758 |
case 'w': /* disable disallowed host warnings */
|
|
|
b65758 |
case 'C':
|
|
|
b65758 |
case 'x': /* disable dns for remote messages */
|
|
|
b65758 |
+ case 'a': /* obsolete switches from here below for backwards compatibility */
|
|
|
b65758 |
+ case 'c':
|
|
|
b65758 |
+ case 'g':
|
|
|
b65758 |
+ case 'h':
|
|
|
b65758 |
+ case 'm':
|
|
|
b65758 |
+ case 'o':
|
|
|
b65758 |
+ case 'p':
|
|
|
b65758 |
+ case 'r':
|
|
|
b65758 |
+ case 't':
|
|
|
b65758 |
CHKiRet(bufOptAdd(ch, optarg));
|
|
|
b65758 |
break;
|
|
|
b65758 |
#if defined(_AIX)
|
|
|
b65758 |
@@ -1249,27 +1258,15 @@ initAll(int argc, char **argv)
|
|
|
b65758 |
DBGPRINTF("deque option %c, optarg '%s'\n", ch, (arg == NULL) ? "" : arg);
|
|
|
b65758 |
switch((char)ch) {
|
|
|
b65758 |
case '4':
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -4 command line option will go away "
|
|
|
b65758 |
- "soon.\nPlease use the global(net.ipprotocol=\"ipv4-only\") "
|
|
|
b65758 |
- "configuration parameter instead.\n");
|
|
|
b65758 |
glbl.SetDefPFFamily(PF_INET);
|
|
|
b65758 |
break;
|
|
|
b65758 |
case '6':
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -6 command line option will go away "
|
|
|
b65758 |
- "soon.\nPlease use the global(net.ipprotocol=\"ipv6-only\") "
|
|
|
b65758 |
- "configuration parameter instead.\n");
|
|
|
b65758 |
glbl.SetDefPFFamily(PF_INET6);
|
|
|
b65758 |
break;
|
|
|
b65758 |
case 'A':
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -A command line option will go away "
|
|
|
b65758 |
- "soon.\n"
|
|
|
b65758 |
- "Please use the omfwd parameter \"upd.sendToAll\" instead.\n");
|
|
|
b65758 |
send_to_all++;
|
|
|
b65758 |
break;
|
|
|
b65758 |
case 'S': /* Source IP for local client to be used on multihomed host */
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -S command line option will go away "
|
|
|
b65758 |
- "soon.\n"
|
|
|
b65758 |
- "Please use the omrelp parameter \"localClientIP\" instead.\n");
|
|
|
b65758 |
if(glbl.GetSourceIPofLocalClient() != NULL) {
|
|
|
b65758 |
fprintf (stderr, "rsyslogd: Only one -S argument allowed, the first one is taken.\n");
|
|
|
b65758 |
} else {
|
|
|
b65758 |
@@ -1283,9 +1280,6 @@ initAll(int argc, char **argv)
|
|
|
b65758 |
PidFile = arg;
|
|
|
b65758 |
break;
|
|
|
b65758 |
case 'l':
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -l command line option will go away "
|
|
|
b65758 |
- "soon.\n Make yourself heard on the rsyslog mailing "
|
|
|
b65758 |
- "list if you need it any longer.\n");
|
|
|
b65758 |
if(glbl.GetLocalHosts() != NULL) {
|
|
|
b65758 |
fprintf (stderr, "rsyslogd: Only one -l argument allowed, the first one is taken.\n");
|
|
|
b65758 |
} else {
|
|
|
b65758 |
@@ -1299,21 +1293,12 @@ initAll(int argc, char **argv)
|
|
|
b65758 |
iConfigVerify = (arg == NULL) ? 0 : atoi(arg);
|
|
|
b65758 |
break;
|
|
|
b65758 |
case 'q': /* add hostname if DNS resolving has failed */
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -q command line option will go away "
|
|
|
b65758 |
- "soon.\nPlease use the global(net.aclAddHostnameOnFail=\"on\") "
|
|
|
b65758 |
- "configuration parameter instead.\n");
|
|
|
b65758 |
*(net.pACLAddHostnameOnFail) = 1;
|
|
|
b65758 |
break;
|
|
|
b65758 |
case 'Q': /* dont resolve hostnames in ACL to IPs */
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -Q command line option will go away "
|
|
|
b65758 |
- "soon.\nPlease use the global(net.aclResolveHostname=\"off\") "
|
|
|
b65758 |
- "configuration parameter instead.\n");
|
|
|
b65758 |
*(net.pACLDontResolve) = 1;
|
|
|
b65758 |
break;
|
|
|
b65758 |
case 's':
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -s command line option will go away "
|
|
|
b65758 |
- "soon.\n Make yourself heard on the rsyslog mailing "
|
|
|
b65758 |
- "list if you need it any longer.\n");
|
|
|
b65758 |
if(glbl.GetStripDomains() != NULL) {
|
|
|
b65758 |
fprintf (stderr, "rsyslogd: Only one -s argument allowed, the first one is taken.\n");
|
|
|
b65758 |
} else {
|
|
|
b65758 |
@@ -1353,17 +1338,21 @@ initAll(int argc, char **argv)
|
|
|
b65758 |
bChDirRoot = 0;
|
|
|
b65758 |
break;
|
|
|
b65758 |
case 'w': /* disable disallowed host warnigs */
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -w command line option will go away "
|
|
|
b65758 |
- "soon.\nPlease use the global(net.permitWarning=\"off\") "
|
|
|
b65758 |
- "configuration parameter instead.\n");
|
|
|
b65758 |
glbl.SetOption_DisallowWarning(0);
|
|
|
b65758 |
break;
|
|
|
b65758 |
case 'x': /* disable dns for remote messages */
|
|
|
b65758 |
- fprintf (stderr, "rsyslogd: the -x command line option will go away "
|
|
|
b65758 |
- "soon.\nPlease use the global(net.enableDNS=\"off\") "
|
|
|
b65758 |
- "configuration parameter instead.\n");
|
|
|
b65758 |
glbl.SetDisableDNS(1);
|
|
|
b65758 |
break;
|
|
|
b65758 |
+ case 'a':
|
|
|
b65758 |
+ case 'c':
|
|
|
b65758 |
+ case 'g':
|
|
|
b65758 |
+ case 'h':
|
|
|
b65758 |
+ case 'm':
|
|
|
b65758 |
+ case 'o':
|
|
|
b65758 |
+ case 'p':
|
|
|
b65758 |
+ case 'r':
|
|
|
b65758 |
+ case 't':
|
|
|
b65758 |
+ break;
|
|
|
b65758 |
case '?':
|
|
|
b65758 |
default:
|
|
|
b65758 |
rsyslogd_usage();
|