]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
ls: remove explicit getfilecon work-around
authorJim Meyering <meyering@redhat.com>
Wed, 7 Oct 2009 20:29:12 +0000 (22:29 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 9 Oct 2009 12:33:10 +0000 (14:33 +0200)
* src/ls.c (gobble_file): Remove l?getfilecon work-around,
now that the gnulib wrappers handle it for us.

src/ls.c

index 30df92c1aca07268817a86e74d2bcbc0ccbc22ab..08fdf5fdc7202b0763520c5b915a15e2430eb5c7 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -2802,17 +2802,6 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
                           : lgetfilecon (absolute_name, &f->scontext));
           err = (attr_len < 0);
 
-          /* Contrary to its documented API, getfilecon may return 0,
-             yet set f->scontext to NULL (on at least Debian's libselinux1
-             2.0.15-2+b1), so work around that bug.
-             FIXME: remove this work-around in 2011, or whenever affected
-             versions of libselinux are long gone.  */
-          if (attr_len == 0)
-            {
-              err = 0;
-              f->scontext = xstrdup ("unlabeled");
-            }
-
           if (err == 0)
             have_selinux = ! STREQ ("unlabeled", f->scontext);
           else