Hello community,

here is the log from the commit of package cronie for openSUSE:12.3 checked in 
at 2013-02-08 14:31:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3/cronie (Old)
 and      /work/SRC/openSUSE:12.3/.cronie.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cronie", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:12.3/cronie/cronie.changes       2013-02-04 
21:08:18.000000000 +0100
+++ /work/SRC/openSUSE:12.3/.cronie.new/cronie.changes  2013-02-08 
23:39:11.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Feb  7 12:19:58 UTC 2013 - [email protected]
+
+- fixed the file descriptor leak correctly (bnc#786096,bnc#802345)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bug-786096_cronie-fdleak.diff ++++++
--- /var/tmp/diff_new_pack.45VQX8/_old  2013-02-08 23:39:12.000000000 +0100
+++ /var/tmp/diff_new_pack.45VQX8/_new  2013-02-08 23:39:12.000000000 +0100
@@ -1,25 +1,42 @@
-Index: cronie-1.4.8/src/do_command.c
-===================================================================
---- cronie-1.4.8.orig/src/do_command.c
-+++ cronie-1.4.8/src/do_command.c
-@@ -69,6 +69,7 @@ static int child_process(entry * e, user
-       int stdin_pipe[2], stdout_pipe[2];
-       char *input_data, *usernm, *mailto, *mailfrom;
-       int children = 0;
-+    int i = 3, open_max = -1;
-       pid_t pid = getpid();
-       struct sigaction sa;
+
+diff --git a/src/cron.c b/src/cron.c
+index 7dc2958..69261c1 100644
+--- a/src/cron.c
++++ b/src/cron.c
+@@ -87,22 +87,21 @@ void set_cron_watched(int fd) {
+       for (i = 0; i < sizeof (wd) / sizeof (wd[0]); ++i) {
+               int w;
  
-@@ -154,6 +155,12 @@ static int child_process(entry * e, user
-               *p = '\0';
+-              if (open(watchpaths[i], O_RDONLY | O_NONBLOCK, 0) != -1) {
+-                      w = inotify_add_watch(fd, watchpaths[i],
+-                              IN_CREATE | IN_CLOSE_WRITE | IN_ATTRIB | 
IN_MODIFY | IN_MOVED_TO |
+-                              IN_MOVED_FROM | IN_MOVE_SELF | IN_DELETE | 
IN_DELETE_SELF);
+-                      if (w < 0) {
+-                              if (wd[i] != -1) {
+-                                      log_it("CRON", pid, "This directory or 
file can't be watched",
+-                                              watchpaths[i], errno);
+-                                      log_it("CRON", pid, "INFO", "running 
without inotify support", 0);
+-                              }
+-                              inotify_enabled = 0;
+-                              set_cron_unwatched(fd);
+-                              return;
++              w = inotify_add_watch(fd, watchpaths[i],
++                      IN_CREATE | IN_CLOSE_WRITE | IN_ATTRIB | IN_MODIFY | 
IN_MOVED_TO |
++                      IN_MOVED_FROM | IN_MOVE_SELF | IN_DELETE | 
IN_DELETE_SELF);
++              if (w < 0) {
++                      if (wd[i] != -1) {
++                              log_it("CRON", pid, "This directory or file 
can't be watched",
++                                      watchpaths[i], errno);
++                              log_it("CRON", pid, "INFO", "running without 
inotify support",
++                                      0);
+                       }
+-                      wd[i] = w;
++                      inotify_enabled = 0;
++                      set_cron_unwatched(fd);
++                      return;
+               }
++              wd[i] = w;
        }
  
-+               open_max = sysconf(_SC_OPEN_MAX);
-+               if (open_max < 0)
-+                       open_max = 1024;
-+               for (i = STDERR + 1; i < open_max; ++i)
-+                       close(i);
-+
- 
-       /* fork again, this time so we can exec the user's command.
-        */
+       if (!inotify_enabled) {
+


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to