Bugtraq mailing list archives
Re: locate
From: Christian.Limpach () nice ch (Christian Limpach)
Date: Wed, 17 Jul 1996 22:52:29 +0200
There is a minor problem with the "locate" command that comes with linux (or perhaps other machines too). You can use it to look into other people's directorys (assuming that you keep the database up to date, and the database file is world readable, as is the default). Just type "locate /home/username" and you get a complete list of what they have. A possible modification to fix this would be to either make the locate database chmod 600 (which would deny everyone all access) or to make updatedb only record entries which are in world readable directories.
The locate database here is only accessible by user locatedb, locate is setuid locatedb to open the database and will then stat files as the user before revealing their names. Since the number of files to check is usually quite small, this doesn't really slow down locate... A patch to findutil-4.1's locate.c is available as ftp://nice.ethz.ch/users/chris/findutils-4.1.locate.patch A script which installs a user (under nextstep) and generates a script to run updatedb so that locatedb will not be world-readable during update is available as ftp://nice.ethz.ch/users/chris/findutils-4.1.locate.after.inst.sh christian -- Christian Limpach, CS-Student @ ETH Zurich, Switzerland. http://nice.ethz.ch/~chris --- System-Administration VIS/NiCE member of the managing board of VIS (http://www.vis.inf.ethz.ch/)
Current thread:
- Re: brute force Jacob Langseth (Jul 10)
- Re: brute force Buckaroo Banzai (Jul 16)
- Holly Wars Aleph One (Jul 16)
- [linux-security] sliplogin (fwd) Paul Danckaert (Jul 16)
- Re: [linux-security] sliplogin (fwd) Nate Williams (Jul 16)
- HP/UX 10.01 Remote Administration accoun Matt Barrie SYD (Jul 16)
- locate Ian Otsane (Jul 16)
- Re: locate Christian Limpach (Jul 17)
- FreeBSD Security Advisory 96:17 - rzsz FreeBSD Security Officer (Jul 17)
- FreeBSD Security Advisory 96:16 - rdist FreeBSD Security Officer (Jul 17)