[Top][All Lists]

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

Re: ls doesn't detect file capabilities properly

From: Pádraig Brady
Subject: Re: ls doesn't detect file capabilities properly
Date: Sat, 07 Nov 2009 12:07:43 +0000
User-agent: Thunderbird (X11/20071008)

Ivan Labath wrote:
> Hello,
> ls calls cap_get_file() from has_capabilty() from print_color_indicator()
> on file names ignoring their path, effectively checking wrong (if any) files
> for capabilities.
> Tested (not) to work on 7.5 and current git version.
> Simple test case:
> mkdir test test/dir
> cd test
> touch a dir/a
> setcap '=' a
> ls --color a dir
> Both a's will be colored according to LS_COLORS ca entry. In most use cases
> however the bug will lead to files with capabilities not being highlighted.
> I believe the proper fix would be to check for capabilities in the same
> place where all other stating is done (gobble_file()).
> I don't have a patch though, as gobble_file() function is very long (300
> lines) and complicated.

Oops. You're correct.
I'll do a fix and test soon.


reply via email to

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