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

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