diff options
author | eivind <eivind@FreeBSD.org> | 2002-06-19 19:22:18 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 2002-06-19 19:22:18 +0000 |
commit | 77309736ae5f33b1a5ed7fe1324f59381d2d17d3 (patch) | |
tree | 4bd0e726c68da4bb2eae33eac8cd1f30ae85d083 /usr.bin/locate | |
parent | f76392df57d4b5de630c84085659e82815c28038 (diff) | |
download | FreeBSD-src-77309736ae5f33b1a5ed7fe1324f59381d2d17d3.zip FreeBSD-src-77309736ae5f33b1a5ed7fe1324f59381d2d17d3.tar.gz |
Make locate.updatedb tell about the security risk when it is run as root.
Diffstat (limited to 'usr.bin/locate')
-rw-r--r-- | usr.bin/locate/locate/updatedb.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh index 361e72d..b9bf698 100644 --- a/usr.bin/locate/locate/updatedb.sh +++ b/usr.bin/locate/locate/updatedb.sh @@ -28,6 +28,11 @@ # # $FreeBSD$ +if [ "$(id -u)" = "0" ]; then + echo ">>> WARNING" 1>&2 + echo ">>> Executing updatedb as root. This WILL reveal all filenames" 1>&2 + echo ">>> on your machine to all login users, which is a security risk." 1>&2 +fi : ${LOCATE_CONFIG="/etc/locate.rc"} if [ -f "$LOCATE_CONFIG" -a -r "$LOCATE_CONFIG" ]; then . $LOCATE_CONFIG |