Package: liblockfile1
Version: 1.08-2
Severity: grave
Tags: patch
Justification: might cause serious data loss


The lockfile_create-function still contains some debug code, which
considers a lock stale after 10 seconds instead of 5 minutes. As
the documentation suggests refreshing the lock every 60 seconds,
programs might lose the lock unexpectedly. Found while researching
#505278.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages liblockfile1 depends on:
ii  libc6                         2.7-13     GNU C Library: Shared libraries

liblockfile1 recommends no packages.

liblockfile1 suggests no packages.

-- no debconf information

*** /home/wsa/Tools/liblockfile-1.08/patches/remove_debug_code
---
 lockfile.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Index: liblockfile-1.08/lockfile.c
===================================================================
--- liblockfile-1.08.orig/lockfile.c
+++ liblockfile-1.08/lockfile.c
@@ -391,13 +391,10 @@ int lockfile_check(const char *lockfile,
         *      Without a pid in the lockfile, the lock
         *      is valid if it is newer than 5 mins.
         */
-#if 0
+
        if (now < st.st_mtime + 300)
                return 0;
-#else
-       if (now < st.st_mtime + 10)
-               return 0;
-#endif
+
        return -1;
 }
 
-- 
  Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry

Attachment: signature.asc
Description: Digital signature

Reply via email to