I've never seen home directories indexed by locate, probably because the db is built
by 'nobody' on other systems and skips anything not world readable.
Root shouldn't be running this.
-Rob
On 9/25/18, 2:41 PM, "Macieira, Thiago" <thiago.macieira(a)intel.com>
wrote:
On Tuesday, 25 September 2018 14:36:19 PDT Auke Kok wrote:
On 09/25/2018 02:24 PM, Nesius, Robert A wrote:
> Doesn't this result in a sub-par user experience on the first run?
only for users that don't have sudo access, really (the others will just
`sudo updatedb` instead).
But really, I've never liked this mechanism at all. Why can't we just
have a simple DBus service instead for this? None of it should ever run
as root (avoids potentially scraping private folders) etc...
Updatedb needs to run as root so it can find all users' files. If it ran as an
unprivileged user and my $HOME were 0700, it would not find my files.
But one user shouldn't see a listing of another user's files. So you're
right:
locate should ask a daemon to get the listing, so daemon filters the listing
to what the user should see. That's a much bigger change than I'm prepared to
make: rewrite / rearchitect locate.
--
Thiago Macieira - thiago.macieira (AT)
intel.com
Software Architect - Intel Open Source Technology Center