On Sun, 2021-10-31 at 09:20 +0100, Steinar H. Gunderson wrote:

> #2 isn't possible; the file could be on a remote filesystem, with
> arbitrarily complex and hidden ACLs

I guess there are no libraries to simulate the result of a Linux kernel
permissions check in userspace & doing that in plocate is too complex.

> (and they may have been changed since updatedb time).

I feel like it is reasonable to do the access test based on the
permissions at the time of the updatedb run.

> Is there a reason why you simply cannot build with --require-
> visibility 0, if so?

At the time when the proposed feature is needed, the files have already
been deleted so rebuilding the database with visibility 0 will just
remove the information about the deleted files, which means the
filenames will not be able to be printed by plocate, which means that
the --require-visibility option will not help in this situation.

> Is this a real problem, or just nice-to-have?

I guess skipping stat when root will be a lot faster when there are a
lot of files matched by the plocate query.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to