bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#488549: Acknowledgement (coreutils: ls -l still prints


From: Jim Meyering
Subject: Re: Bug#488549: Acknowledgement (coreutils: ls -l still prints
Date: Tue, 05 Aug 2008 10:40:16 +0200

"John David Anglin" <address@hidden> wrote:
>> getfilecon_raw() uses getxattr().  The manpage for getxattr()
>> says it returns ENOTSUP if extended attributes are not supported.
>> This is a syscall and it will take a bit more digging to see if
>> it is consistent with the documentation.
>
> I finally got a working version of strace.  I see that lgetxattr()
> returns EOPNOTSUPP, not ENOTSUP.

Thanks for the details.
I'll push your fix pretty soon:

>From d5bacd2f6f8e1b677b3a88a0416c6ec10faee79a Mon Sep 17 00:00:00 2001
From: John David Anglin <address@hidden>
Date: Mon, 4 Aug 2008 14:04:44 +0200
Subject: [PATCH] ls: ignore spurious getfilecon failure due to lack of SELinux 
support

* src/ls.c (gobble_file): Upon failed getfilecon, treat an errno value
of EOPNOTSUPP just like ENOTSUP.  See <http://bugs.debian.org/488549>.
---
 src/ls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/ls.c b/src/ls.c
index fd32730..9261f62 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2715,7 +2715,7 @@ gobble_file (char const *name, enum filetype type, ino_t 
inode,
                 ls fail just because the file (even a command line argument)
                 isn't on the right type of file system.  I.e., a getfilecon
                 failure isn't in the same class as a stat failure.  */
-             if (errno == ENOTSUP || errno == ENODATA)
+             if (errno == ENOTSUP || errno == EOPNOTSUPP || errno == ENODATA)
                err = 0;
            }

--
1.6.0.rc1.36.g5ff70




reply via email to

[Prev in Thread] Current Thread [Next in Thread]