Hello community,

here is the log from the commit of package psmisc for openSUSE:Factory
checked in at Wed Oct 5 17:47:31 CEST 2011.



--------
--- openSUSE:Factory/psmisc/psmisc.changes      2011-10-04 17:01:00.000000000 
+0200
+++ /mounts/work_src_done/STABLE/psmisc/psmisc.changes  2011-10-05 
11:49:24.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Oct  5 09:47:38 UTC 2011 - wer...@suse.de
+
+- Handle internal size of structure stat by including config.h
+  to avoid size missmatch during copy result back (bnc#720882)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


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

Other differences:
------------------
++++++ psmisc.spec ++++++
--- /var/tmp/diff_new_pack.iwFObO/_old  2011-10-05 17:47:27.000000000 +0200
+++ /var/tmp/diff_new_pack.iwFObO/_new  2011-10-05 17:47:27.000000000 +0200
@@ -51,7 +51,7 @@
 %prep
 %setup -q
 %patch42 -p1
-#%patch43 -p1
+%patch43 -p1 -b .to
 %patch1 -p0 -b .tigetstr
 %patch2 -p0 -b .pstree
 %patch0 -p0 -b .0

++++++ psmisc-22.15-timeout.patch ++++++
--- /var/tmp/diff_new_pack.iwFObO/_old  2011-10-05 17:47:27.000000000 +0200
+++ /var/tmp/diff_new_pack.iwFObO/_new  2011-10-05 17:47:27.000000000 +0200
@@ -120,7 +120,7 @@
 index e69de29..3b582a3 100644
 --- a/src/timeout.c
 +++ b/src/timeout.c
-@@ -0,0 +1,208 @@
+@@ -0,0 +1,215 @@
 +/*
 + * timout.c   Advanced timeout handling for file system calls
 + *            to avoid deadlocks on remote file shares.
@@ -141,6 +141,8 @@
 +#define _GNU_SOURCE
 +#endif
 +
++#include "config.h"           /* For _FILE_OFFSET_BITS */
++
 +#include <errno.h>
 +#include <pthread.h>
 +#include <setjmp.h>
@@ -164,6 +166,9 @@
 +# ifndef  constructor
 +#  define constructor         __constructor__
 +# endif
++# ifndef  packed
++#  define packed              __packed__
++# endif
 +# ifndef  inline
 +#  define inline              __inline__
 +# endif
@@ -187,8 +192,7 @@
 +      int errcode;
 +      struct stat argument;
 +      stat_t function;
-+      char *path;
-+} handle_t;
++} attribute((packed)) handle_t;
 +
 +static volatile handle_t handle;
 +
@@ -205,6 +209,7 @@
 +static void attribute((constructor)) start(void)
 +{
 +      sigset_t sigset, oldset;
++      char path[PATH_MAX];
 +      handle_t handle;
 +      ssize_t in;
 +
@@ -234,12 +239,10 @@
 +      pipes[0] = pipes[3] = -1;
 +
 +      while ((in = read(0, &handle, sizeof(handle_t))) == sizeof(handle_t) &&
-+             (handle.path = (char*)malloc(handle.len)) &&
-+             (in = read(0, handle.path, handle.len)) == handle.len) {
-+              if (handle.function(handle.path, &handle.argument) < 0)
++             (in = read(0, path, handle.len)) == handle.len) {
++              if (handle.function(path, &handle.argument) < 0)
 +                      handle.errcode = errno;
 +              write(1, &handle.errcode, 
sizeof(handle.errcode)+sizeof(handle.argument));
-+              free(handle.path);
 +      }
 +      sigprocmask(SIG_SETMASK, &oldset, NULL);
 +      exit(0);
@@ -273,7 +276,6 @@
 +{
 +      struct sigaction old_act, new_act;
 +      sigset_t sigset, oldset;
-+      handle_t handle;
 +
 +      if (active <= 0) {      /* Oops, last one failed therefore clear status 
and restart */
 +              int status;
@@ -282,10 +284,13 @@
 +      }
 +
 +      handle.len = strlen(path) + 1;
++      if (handle.len >= PATH_MAX) {
++              errno = ENAMETOOLONG;
++              goto error;
++      }
 +      handle.errcode = 0;
 +      handle.argument = *argument;
 +      handle.function = function;
-+      handle.path = (char*)0;
 +
 +      sigemptyset(&sigset);
 +      sigaddset(&sigset, SIGALRM);
@@ -314,8 +319,10 @@
 +              errno = handle.errcode;
 +              goto error;
 +      }
++
 +      *argument = handle.argument;
 +      sigprocmask(SIG_SETMASK, &oldset, NULL);
++
 +      return 0;
 +timed:
 +      (void) alarm(0);
@@ -333,7 +340,7 @@
 index e69de29..50dd135 100644
 --- a/src/timeout.h
 +++ b/src/timeout.h
-@@ -0,0 +1,33 @@
+@@ -0,0 +1,36 @@
 +/*
 + * timout.h   Advanced timeout handling for file system calls
 + *            to avoid deadlocks on remote file shares.
@@ -353,9 +360,12 @@
 +#ifndef _TIMEOUT_H
 +#define _TIMEOUT_H
 +
++#include "config.h"           /* For _FILE_OFFSET_BITS */
++
 +#include <sys/types.h>
 +#include <sys/stat.h>
 +#include <time.h>
++#include <limits.h>
 +
 +#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
 +# ifndef  restrict

continue with "q"...



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to