Blame SOURCES/rsyslog-8.2102.0-rhbz1984489-remove-abort-on-id-resolution-fail.patch

216606
diff -up rsyslog-8.2102.0/runtime/cfsysline.c.orig rsyslog-8.2102.0/runtime/cfsysline.c
216606
--- rsyslog-8.2102.0/runtime/cfsysline.c.orig	2021-08-04 07:16:02.663163106 +0200
216606
+++ rsyslog-8.2102.0/runtime/cfsysline.c	2021-08-04 07:18:05.952490008 +0200
216606
@@ -353,13 +353,8 @@ static rsRetVal doGetGID(uchar **pp, rsR
216606
 	assert(*pp != NULL);
216606
 
216606
 	if(getSubString(pp, (char*) szName, sizeof(szName), ' ')  != 0) {
216606
-		if(loadConf->globals.abortOnIDResolutionFail) {
216606
-			fprintf(stderr, "could not extract group name: %s\n", (char*)szName);
216606
-			exit(1); /* good exit */
216606
-		} else {
216606
-			LogError(0, RS_RET_NOT_FOUND, "could not extract group name");
216606
-			ABORT_FINALIZE(RS_RET_NOT_FOUND);
216606
-		}
216606
+		LogError(0, RS_RET_NOT_FOUND, "could not extract group name");
216606
+		ABORT_FINALIZE(RS_RET_NOT_FOUND);
216606
 	}
216606
 
216606
 	do {
216606
@@ -380,10 +375,6 @@ static rsRetVal doGetGID(uchar **pp, rsR
216606
 			LogError(0, RS_RET_NOT_FOUND, "ID for group '%s' could not be found", szName);
216606
 		}
216606
 		iRet = RS_RET_NOT_FOUND;
216606
-		if(loadConf->globals.abortOnIDResolutionFail) {
216606
-			fprintf(stderr, "ID for group '%s' could not be found or error\n", szName);
216606
-			exit(1); /* good exit */
216606
-		}
216606
 	} else {
216606
 		if(pSetHdlr == NULL) {
216606
 			/* we should set value directly to var */
216606
@@ -418,25 +409,15 @@ static rsRetVal doGetUID(uchar **pp, rsR
216606
 	assert(*pp != NULL);
216606
 
216606
 	if(getSubString(pp, (char*) szName, sizeof(szName), ' ')  != 0) {
216606
-		if(loadConf->globals.abortOnIDResolutionFail) {
216606
-			fprintf(stderr, "could not extract user name: %s\n", (char*)szName);
216606
-			exit(1); /* good exit */
216606
-		} else {
216606
-			LogError(0, RS_RET_NOT_FOUND, "could not extract user name");
216606
-			ABORT_FINALIZE(RS_RET_NOT_FOUND);
216606
-		}
216606
+		LogError(0, RS_RET_NOT_FOUND, "could not extract user name");
216606
+		ABORT_FINALIZE(RS_RET_NOT_FOUND);
216606
 	}
216606
 
216606
 	getpwnam_r((char*)szName, &pwBuf, stringBuf, sizeof(stringBuf), &ppwBuf);
216606
 
216606
 	if(ppwBuf == NULL) {
216606
-		if(loadConf->globals.abortOnIDResolutionFail) {
216606
-			fprintf(stderr, "ID for user '%s' could not be found or error\n", (char*)szName);
216606
-			exit(1); /* good exit */
216606
-		} else {
216606
-			LogError(0, RS_RET_NOT_FOUND, "ID for user '%s' could not be found or error", (char*)szName);
216606
-			iRet = RS_RET_NOT_FOUND;
216606
-		}
216606
+		LogError(0, RS_RET_NOT_FOUND, "ID for user '%s' could not be found or error", (char*)szName);
216606
+		iRet = RS_RET_NOT_FOUND;
216606
 	} else {
216606
 		if(pSetHdlr == NULL) {
216606
 			/* we should set value directly to var */
216606
diff -up rsyslog-8.2102.0/runtime/glbl.c.orig rsyslog-8.2102.0/runtime/glbl.c
216606
--- rsyslog-8.2102.0/runtime/glbl.c.orig	2021-08-04 07:18:19.301633677 +0200
216606
+++ rsyslog-8.2102.0/runtime/glbl.c	2021-08-04 07:19:02.409019106 +0200
216606
@@ -210,7 +210,6 @@ static struct cnfparamdescr cnfparamdesc
216606
 	{ "environment", eCmdHdlrArray, 0 },
216606
 	{ "processinternalmessages", eCmdHdlrBinary, 0 },
216606
 	{ "umask", eCmdHdlrFileCreateMode, 0 },
216606
-	{ "security.abortonidresolutionfail", eCmdHdlrBinary, 0 },
216606
 	{ "internal.developeronly.options", eCmdHdlrInt, 0 },
216606
 	{ "internalmsg.ratelimit.interval", eCmdHdlrPositiveInt, 0 },
216606
 	{ "internalmsg.ratelimit.burst", eCmdHdlrPositiveInt, 0 },
216606
@@ -1443,8 +1442,6 @@ glblDoneLoadCnf(void)
216606
 			glblInputTimeoutShutdown = (int) cnfparamvals[i].val.d.n;
216606
 		} else if(!strcmp(paramblk.descr[i].name, "privdrop.group.keepsupplemental")) {
216606
 			loadConf->globals.gidDropPrivKeepSupplemental = (int) cnfparamvals[i].val.d.n;
216606
-		} else if(!strcmp(paramblk.descr[i].name, "security.abortonidresolutionfail")) {
216606
-			loadConf->globals.abortOnIDResolutionFail = (int) cnfparamvals[i].val.d.n;
216606
 		} else if(!strcmp(paramblk.descr[i].name, "net.acladdhostnameonfail")) {
216606
 			*(net.pACLAddHostnameOnFail) = (int) cnfparamvals[i].val.d.n;
216606
 		} else if(!strcmp(paramblk.descr[i].name, "net.aclresolvehostname")) {
216606
diff -up rsyslog-8.2102.0/runtime/rsconf.c.orig rsyslog-8.2102.0/runtime/rsconf.c
216606
--- rsyslog-8.2102.0/runtime/rsconf.c.orig	2021-08-04 07:19:13.103104854 +0200
216606
+++ rsyslog-8.2102.0/runtime/rsconf.c	2021-08-04 07:19:44.635357684 +0200
216606
@@ -156,7 +156,6 @@ static void cnfSetDefaults(rsconf_t *pTh
216606
 	pThis->globals.maxErrMsgToStderr = -1;
216606
 	pThis->globals.umask = -1;
216606
 	pThis->globals.gidDropPrivKeepSupplemental = 0;
216606
-	pThis->globals.abortOnIDResolutionFail = 1;
216606
 	pThis->templates.root = NULL;
216606
 	pThis->templates.last = NULL;
216606
 	pThis->templates.lastStatic = NULL;
216606
diff -up rsyslog-8.2102.0/runtime/rsconf.h.orig rsyslog-8.2102.0/runtime/rsconf.h
216606
--- rsyslog-8.2102.0/runtime/rsconf.h.orig	2021-08-04 07:20:15.848607958 +0200
216606
+++ rsyslog-8.2102.0/runtime/rsconf.h	2021-08-04 07:20:42.782823920 +0200
216606
@@ -73,7 +73,6 @@ struct globals_s {
216606
 	int uidDropPriv;	/* user-id to which priveleges should be dropped to */
216606
 	int gidDropPriv;	/* group-id to which priveleges should be dropped to */
216606
 	int gidDropPrivKeepSupplemental; /* keep supplemental groups when dropping? */
216606
-	int abortOnIDResolutionFail;
216606
 	int umask;		/* umask to use */
216606
 	uchar *pszConfDAGFile;	/* name of config DAG file, non-NULL means generate one */
216606