1
0
mirror of https://git.savannah.gnu.org/git/coreutils.git synced 2026-10-24 02:08:57 +03:00

ls: make it possible to disable file capabilities checking

* ls.c (print_color_indicator): Do not check for file capability
if that attribute is not being colored.
Since 84f6abfe00, ls --color would check
each file for "capabilities".  In <http://bugzilla.redhat.com/467508>,
James Antill reported that ls --color seemed slower with capabilities
detection.
This commit is contained in:
Kamil Dudka
2008-10-20 15:39:07 +02:00
committed by Jim Meyering
parent 08c38ab7cb
commit f3f1ccfd87

View File

@@ -3975,7 +3975,7 @@ print_color_indicator (const char *name, mode_t mode, int linkok,
type = C_SETUID;
else if ((mode & S_ISGID) != 0)
type = C_SETGID;
else if (has_capability (name))
else if (is_colored (C_CAP) && has_capability (name))
type = C_CAP;
else if ((mode & S_IXUGO) != 0)
type = C_EXEC;