Package: acl
Version: 2.2.37-1
Severity: normal
Tags: patch

when getfacl is run on a non-existant file, it segfaults because it
passes a NULL string to ftw().

the attached patch fixes things for me.

        --dkg

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages acl depends on:
ii  libacl1                       2.2.37-1   Access control list shared library
ii  libattr1                      2.4.32-1   Extended attribute shared library
ii  libc6                         2.3.6-7    GNU C Library: Shared libraries

acl recommends no packages.

-- no debconf information
--- getfacl/getfacl.c.orig      2006-06-06 18:33:43.000000000 -0400
+++ getfacl/getfacl.c   2006-06-06 18:27:11.000000000 -0400
@@ -621,8 +621,7 @@
                fprintf(stderr, "%s: %s: %s\n", progname,
                        xquote(file), strerror(errno));
                __errors++;
-       }
-       if (nftw(p, __do_print, 0, opt_walk_logical ? 0 : FTW_PHYS) < 0) {
+       } else if (nftw(p, __do_print, 0, opt_walk_logical ? 0 : FTW_PHYS) < 0) 
{
                fprintf(stderr, "%s: %s: %s\n", progname, xquote(file),
                        strerror(errno));
                __errors++;

Reply via email to