rsyslog/rsyslog-8.24.0-missing-chdir-w-chroot.patch
Jiri Vymazal 9a9f6af09f * Mon Feb 20 2017 Jiri Vymazal <jvymazal@redhat.com> - 8.24.0-6
- fixed typo in chdir location
  resolves: rhbz#1422542
- updated one more directive in default config
  resolves: rhbz#1419625
2017-02-20 10:27:04 +01:00

16 lines
431 B
Diff

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);