rsyslog/rsyslog-8.24.0-missing-chdir-w-chroot.patch
Jiri Vymazal 4674d1ce99 * Fri Feb 17 2017 Jiri Vymazal <jvymazal@redhat.com> - 8.24.0-5
- new default config, using RainerScript wherever possible
  resolves: rhbz#1419625
- updated testbench guard as testbench now needs explicit configuration
  see: rhbz#1211194
- added patch to make chdir call after chroot
  resolves: rhbz#1422542
2017-02-17 09:35:40 +01:00

16 lines
432 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);