Date: Sun, 6 Oct 2024 11:07:26 GMT From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 46d52461bf36 - stable/13 - locate.updatedb: Revert to using cat to copy the db. Message-ID: <202410061107.496B7QvW039371@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410061107.496B7QvW039371>