--- syslog-ng-2.0.9.orig/src/main.c
+++ syslog-ng-2.0.9/src/main.c
@@ -275,7 +275,15 @@
 {
   if (chroot_dir)
     {
-      if (chroot(chroot_dir) < 0)
+      if (chdir(chroot_dir) <0)
+        {
+          msg_error("Error during chdir() before chroot()",
+                    evt_tag_errno(EVT_TAG_OSERROR, errno),
+                    NULL);
+          return 0;
+        }
+
+      if (chroot(chroot_dir) < 0)
        {
          msg_error("Error during chroot()",
                    evt_tag_errno(EVT_TAG_OSERROR, errno),



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to