GNU bug report logs - #12020
ls should show when extended system attributes are set

Previous Next

Package: coreutils;

Reported by: Luk Claes <luk <at> debian.org>

Date: Sat, 21 Jul 2012 21:17:07 UTC

Severity: normal

Tags: moreinfo, notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Luk Claes <luk <at> debian.org>
Cc: Eric Blake <eblake <at> redhat.com>, 12020 <at> debbugs.gnu.org
Subject: bug#12020: ls should show when extended system attributes are set
Date: Sun, 22 Jul 2012 14:40:46 +0200
Luk Claes wrote:
...
> But it apparently does not show when capabilites are active, could that
> be added (or was that added in the meantime in a subsequent version)?
>
> $ setcap cap_chown+ep foo
>
> $ ls -l foo
> -rw-r--r-- 1 luk luk 5 Jul 22 00:37 foo
>
> $ sudo getcap foo
> foo = cap_chown+ep

That's right: capabilities are currently not taken into account when
printing ls -l's "optional alternate access method" flag.  However,
with --color, we already do test for the existence of capabilities,
and if found, highlight each affected file differently.

A comment says that the capabilities existence test adds 30% to the cost
of ls --color (it's probably even more, now), so I would not impose it on
ls -l without due consideration.  We know from recent performance-related
improvements that checks like this can have a big impact when operating
on remote file systems.

When already using --color, we do get each test result for free, so it
is tempting to take it into account in that case.  However, that would
make the use of --color change more than just highlighting, but the
actual information displayed, which I would not want to do.




This bug report was last modified 6 years and 295 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.