updatedb?
Devin Teske
devin.teske at fisglobal.com
Tue Dec 18 21:11:09 UTC 2012
On Dec 18, 2012, at 1:01 PM, Walter Hurry wrote:
> $ sudo /usr/libexec/locate.updatedb
>>>> WARNING
>>>> Executing updatedb as root. This WILL reveal all filenames
>>>> on your machine to all login users, which is a security risk.
> $
>
> Why is it a "security risk"? Security through obscurity? Really? In this
> day and age?
>
> Or am I missing something?
You're missing the fact that updatedb essentially makes a list of every file on your disk (and that this list is able to be queried by anybody regardless of permissions or group membership).
The best and most notable example of this constituting a "security risk" is if you've prevented access to a directory… root's home-directory (/root) for example. Illustratively, this would be if you did "chmod go-wrx somedir" so that only the owner could see inside it.
When you run updatedb as root, it traverses all directories even those that you may have posted a big "keep out" sign on (aforementioned "chmod"). Then every non-privileged user on the system can list the contents of your secret hideout with the "keep out" sign posted on it. You might have well built that house out of glass (they can't read the contents of the books on your bookshelf, but they can see the covers and know what you've got stocked on the shelves).
If this doesn't concern you, (and there's plenty of reasons to ignore this warning -- say, if you operate in a closed environment where trust isn't an issue and you value the ability to find any file on the system at any time) -- then proceed my friend, … proceed.
Otherwise, it's best to think about running updatedb as a non-privileged user that (a) can't use built-in super-user privileges to bypass security settings when enumerating the UNIX filesystems you've configured in locate.conf(5) (optional -- by default it acts sensibly and ignores what you'd expect it to).
--
Devin
_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
More information about the freebsd-questions
mailing list