summaryrefslogtreecommitdiffstats
path: root/color.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2018-12-17 22:05:49 -0500
committerTavian Barnes <tavianator@tavianator.com>2018-12-17 22:05:49 -0500
commit18fc03882d49ff46b41a53afc0d6232e1dfbbb35 (patch)
treedec8b26d1801c4d170cfb148c3758e95dfd4e1c9 /color.c
parent50b3caa2625b4377b03fe8ca6967f769cdd6ee95 (diff)
downloadbfs-18fc03882d49ff46b41a53afc0d6232e1dfbbb35.tar.xz
color: Support coloring files with capabilities
Diffstat (limited to 'color.c')
-rw-r--r--color.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/color.c b/color.c
index cdc79a6..0dc9f3d 100644
--- a/color.c
+++ b/color.c
@@ -327,6 +327,8 @@ static const char *file_color(const struct colors *colors, const char *filename,
color = colors->setuid;
} else if (sb->mode & S_ISGID) {
color = colors->setgid;
+ } else if (bfs_check_capabilities(ftwbuf)) {
+ color = colors->capable;
} else if (sb->mode & 0111) {
color = colors->exec;
}