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