aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2024-10-02 15:54:57 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2024-10-02 15:55:06 +0000
commit26bd374e72681860af4bf9d639308ad245949460 (patch)
tree9be668f20fe3606ef623165198d1fb7dbc6fe1a7 /usr.bin
parent2201f7c49f11acc636d8d8be4b660a42a4ae4e58 (diff)
downloadsrc-26bd374e72681860af4bf9d639308ad245949460.tar.gz
src-26bd374e72681860af4bf9d639308ad245949460.zip
locate.updatedb: Revert to using cat to copy the db.
This script is usually run unprivileged, so install fails to create a temporary file while copying the finished database. Revert to using cat, which can overwrite the existing file as it is usually owned by the same user which is running the script. Fixes: f62c1f3f8e91 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46872
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/locate/locate/updatedb.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh
index ca1a79116a91..7d42cbb2260d 100644
--- a/usr.bin/locate/locate/updatedb.sh
+++ b/usr.bin/locate/locate/updatedb.sh
@@ -96,5 +96,5 @@ then
echo "updatedb: locate database $tmp is empty" >&2
exit 1
fi
- install $tmp $FCODES
+ cat $tmp >$FCODES
fi