[prev in list] [next in list] [prev in thread] [next in thread]
List: coreutils
Subject: Re: [coreutils] [PATCHv2] stat: print SELinux context when available
From: Jim Meyering <jim () meyering ! net>
Date: 2010-10-05 12:01:58
Message-ID: 8762xgyhjd.fsf () meyering ! net
[Download RAW message or body]
Eric Blake wrote:
> On 10/05/2010 03:03 AM, Jim Meyering wrote:
>>> * src/stat.c (default_format): Don't print SELinux context
>>> when in file system (-f) mode, as the context is associated
>>> with the file, not the file system.
>>> Fix logic inversion, so that in terse mode, %C is included
>>> only when is_selinux_enabled and not vice versa.
>>
>> Good catches. Thanks!
>> The above fixes sound fine.
>
> If %C only operates on files, and not file systems, then why do we
> support %C under -f in the first place? Wouldn't the better patch be
> to completely remove %C from -f?
Indeed. That would be better.
If either of you feels like doing that, please update this comment, too:
/* Very specialized function (modifies FORMAT), just so as to avoid
duplicating this code between both print_statfs and print_stat.
Return zero upon success, nonzero upon failure. */
static bool ATTRIBUTE_WARN_UNUSED_RESULT
out_file_context (char const *filename, char *pformat, size_t prefix_len)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic