Blame SOURCES/rsyslog-8.24.0-rhbz1403831-missing-cmd-line-switches.patch

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