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