HomeFreeBSD

locate.updatedb: Revert to using cat to copy the db.

Description

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)

Details

Provenance
desAuthored on Oct 2 2024, 3:54 PM
Reviewer
kevans
Differential Revision
D46872: locate.updatedb: Revert to using cat to copy the db.
Parents
rGeefeb6ca68bf: locate.updatedb: Explicitly exit from trap code.
Branches
Unknown
Tags
Unknown