History log of /netbsd/external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c (Results 1 – 7 of 7)
Revision Date Author Comments
# 0159465b 14-Aug-2020 christos <christos@NetBSD.org>

PR/55568: Andreas Gustafsson: Set the error when failing to create a temp file.


# 79e36241 10-Feb-2020 christos <christos@NetBSD.org>

When extracting symlinks atomically remove them like we do for hard links.


# c346cf9c 14-Jan-2020 christos <christos@NetBSD.org>

In the extract atomic case, remove the destination hard link first
since it did not get removed before for us. If we wanted to do this
right, we would do the mk*temp() file generation and trying to l

In the extract atomic case, remove the destination hard link first
since it did not get removed before for us. If we wanted to do this
right, we would do the mk*temp() file generation and trying to link
instead of open, and finally when we got the link to succeed, we
would rename the temp link to the final destination name, making
hard link creation atomic. For now we just remove first.

show more ...


# 6e65d640 12-Jan-2020 christos <christos@NetBSD.org>

Leave pre-existing symlinks alone on extraction

When libarchive encounters an existing symbolic link during extraction
it removes that symbolic link first before overwriting it, unless
it is told th

Leave pre-existing symlinks alone on extraction

When libarchive encounters an existing symbolic link during extraction
it removes that symbolic link first before overwriting it, unless
it is told that it can trust symlinks from the archive.

Placing symbolic links on known paths in the extracting subdirectory
is a simple way that a system administrator can place data at a
different location without having the overhead of a mountpoint.

Trusting symlinks from an archive is never safe because they can
maliciously overwrite files outside of the extraction directory.

This patch adds a linked-list to track of the symbolic links that
were created during extraction so that it does not trust them. This
way during extraction, libarchive can remove the symlinks it created,
but leave the pre-existing ones alone.

Unit-tests were adjusted for this new behavior.

(this is pull request 1300)

show more ...


# 01d72c65 12-Jan-2020 christos <christos@NetBSD.org>

Introduce ARCHIVE_EXTRACT_ATOMIC and set it by default on bsdtar.

This flag changes the way that regular files are extracted:

Instead of removing existing files first and re-creating them in
order

Introduce ARCHIVE_EXTRACT_ATOMIC and set it by default on bsdtar.

This flag changes the way that regular files are extracted:

Instead of removing existing files first and re-creating them in
order to replace their contents, a temporary file is created and
when writing to the temporary file is completed, the file is
rename(2)d to the final destination name.

This has the effect of presenting a consistent view of the file to
the system (either the file with the new contents or the file with
the old contents). Removing and overwriting the file has the
undesired side effect that the the system can either not see the
file at all (from the time it is being removed till the time it is
being re-created), or worse it can see partial file contents. This
is problematic when extracting system files (for example shared
libraries).

Perhaps there should be a flag to disable it, when for example it
is not desirable because of space constraints, but then again
one can specify to unlink the file before.

(this is pull request 1289)

show more ...


# efdd4e46 24-Jul-2019 joerg <joerg@NetBSD.org>

Import libarchive 3.4.0


# d05f0226 20-Apr-2017 joerg <joerg@NetBSD.org>

Import libarchive 3.3.2pre (7ad477ea7655f3dfcdcfa5adcb792f0ec864969d).