git: 46d52461bf36 - stable/13 - locate.updatedb: Revert to using cat to copy the db.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Oct 2024 11:07:26 UTC
The branch stable/13 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=46d52461bf36d941b817e52a637845142a90946a
commit 46d52461bf36d941b817e52a637845142a90946a
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2024-10-02 15:54:57 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2024-10-06 09:16:34 +0000
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
(cherry picked from commit 26bd374e72681860af4bf9d639308ad245949460)
---
usr.bin/locate/locate/updatedb.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.bin/locate/locate/updatedb.sh b/usr.bin/locate/locate/updatedb.sh
index 846fd6dc0d7b..01d993918e92 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