"John David Anglin" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
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



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to