git: 26bd374e7268 - main - locate.updatedb: Revert to using cat to copy the db.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 02 Oct 2024 15:55:58 UTC
The branch main has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=26bd374e72681860af4bf9d639308ad245949460
commit 26bd374e72681860af4bf9d639308ad245949460
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-02 15:55:06 +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
---
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 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