mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Make locate.updatedb tell about the security risk when it is run as root.
This commit is contained in:
parent
0c49c1f970
commit
0f798c48ed
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue