Package: unionfs-fuse Version: 0.21-3a0.mrvn.1 Severity: normal Tags: patch
Hi, I've patched unionfs-fuse copy-on-write to do copy-on-use (patch pending) so it acts as a cache filesystem. Doing that I noticed that symlinks are broken when they are copied in cow_link(). It also does not 0 terminate the readlink output before using the string. MfG Goswin -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (400, 'unstable-i386') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-kvm-nofb (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/bash Versions of packages unionfs-fuse depends on: ii fuse-utils 2.8.0~pre2-1 Filesystem in USErspace (utilities ii libc6 2.9-12 GNU C Library: Shared libraries ii libfuse2 2.8.0~pre2-1 Filesystem in USErspace library unionfs-fuse recommends no packages. unionfs-fuse suggests no packages. -- no debconf information
Index: unionfs-fuse-0.21/src/cow_utils.c =================================================================== --- unionfs-fuse-0.21.orig/src/cow_utils.c 2009-06-17 10:09:35.000000000 +0200 +++ unionfs-fuse-0.21/src/cow_utils.c 2009-06-17 10:12:53.000000000 +0200 @@ -245,8 +245,9 @@ usyslog(LOG_WARNING, "readlink: %s", cow->from_path); return (1); } - - if (symlink(cow->from_path, cow->to_path)) { + link[len] = 0; + + if (symlink(link, cow->to_path)) { usyslog(LOG_WARNING, "symlink: %s", link); return (1); }