Blame SOURCES/rsyslog-8.24.0-rhbz1422789-missing-chdir-w-chroot.patch

a856a8
diff --git a/tools/rsyslogd.c b/tools/rsyslogd.c
a856a8
index c099705..12b037f 100644
a856a8
--- a/tools/rsyslogd.c
a856a8
+++ b/tools/rsyslogd.c
a856a8
@@ -1350,6 +1350,10 @@ initAll(int argc, char **argv)
a856a8
 				perror("chroot");
a856a8
 				exit(1);
a856a8
 			}
a856a8
+            if(chdir("/") != 0) {
a856a8
+                perror("chdir");
a856a8
+                exit(1);
a856a8
+            }
a856a8
 			break;
a856a8
 		case 'u':		/* misc user settings */
a856a8
 			iHelperUOpt = (arg == NULL) ? 0 : atoi(arg);