bug-findutils
[Top][All Lists]
Advanced

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

Re: [bug #58941] wishlist: Support for -xattr -xattrname


From: Morgan Weetman
Subject: Re: [bug #58941] wishlist: Support for -xattr -xattrname
Date: Mon, 17 Aug 2020 08:48:47 +1000

Thanks Berny .. I guess my concern is that on systems that enable an LSM
such as SELinux, the value of having `-xattr` with no argument is zero, as
the result will include all labelled files.

I'm not sure what the ratio is of SELinux (SMACK as well?) enabled systems
vs those that aren't... but Wikipedia suggests Fedora, Debian, Ubuntu, SuSE
and RHEL variants all carry support.

A simple example from my home dir:
$ for file in ~/*; do ./listxattr $file; done
security.selinux: unconfined_u:object_r:unlabeled_t:s0
security.selinux: unconfined_u:object_r:unlabeled_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
system.posix_acl_access:
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:audio_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:unlabeled_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0
security.selinux: unconfined_u:object_r:user_home_t:s0

thanks




On Fri, 14 Aug 2020 at 18:24, Bernhard Voelker <mail@bernhard-voelker.de>
wrote:

> Hi Morgan,
>
> On 2020-08-14 07:57, Morgan Weetman wrote:
> > On a side note.. an issue has been raised against my repo regarding
> > compatibility with BSD-based find in MacOS and Solaris, apparently -xattr
> > in those distributions doesn't take an argument.
> >
> > Could you tell me what the strategy is for handling compatibility between
> > GNU find and BSD find? Do we try to be compatible? Do we not care and
> just
> > do our own thing?
>
> as it's outside of the POSIX specification, we could do whatever we want,
> but if there is existing behavior in other implementation, then we should
> try to do the same.  If it turns out a feature is so much better, then we
> can have an extra primitive.
> I didn't look yet what the others are doing, so just speaking out into
> the blue, e.g.:
> * '-xattr' (without argument) to test if a file has extended attributes,
> * '-xattrname PATTERN' to check with a file has extended attributes
> matching
>   the given PATTERN, and
> * '-xattrvalue PATTERN' to check if a file has an extended attribute
>   with a value matching the given pattern.
>
> Have a nice day,
> Berny
>
>

-- 
Morgan Weetman
Services Content Architect
M: +61 439 469 793
https://www.redhat.com/en/services/training-and-certification


reply via email to

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