]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Unify temporary directory handling
authorDag-Erling Smørgrav <des@des.no>
Mon, 13 Oct 2025 12:13:47 +0000 (14:13 +0200)
committerDag-Erling Smørgrav <des@des.no>
Mon, 13 Oct 2025 14:58:44 +0000 (16:58 +0200)
commite12c955dca632df0204b9f3cfbbe265079d7c30c
tree744e9196ed0eadef5e256ccb0f2f299d371be226
parent46fe318edd44f60bdda972f039a18d2fef7c51f8
Unify temporary directory handling

In archive_util.c, we have a private function named get_tempdir() which
is used by __archive_mktemp() to get the temporary directory if the
caller did not pass one.

In archive_read_disk_entry_from_file.c, we use the same logic with a
slight twist (don't trust the environment if setugid) to create a
temporary file for metadata.

Merge the two by renaming get_tempdir() to __archive_get_tempdir() and
unstaticizing it (with a prototype in archive_private.h).
CMakeLists.txt
configure.ac
libarchive/archive_private.h
libarchive/archive_read_disk_entry_from_file.c
libarchive/archive_util.c