forked from proxmox-mirrors/proxmox-backup
This fixes extracting any pxar directory with a hardlink.
linkat defaults to not following symlinks for the olddir (source)
path, and only understands the `AT_SYMLINK_FOLLOW` (notice, there is
no "NO") and `AT_EMPTY_PATH` flags, as can be read in the linkat
man page.
The nix::unistd::LinkatFlags::NoSymlinkFollow flag was used here
previously with nix 0.26, but it was just a wrapper around the
AtFlags, but with NoSymlinkFollow resolving to AtFlags::empty() [0].
The nix 0.29 migration did a 1:1 translation from the now depracated
LinkatFlags to AtFlags, i.e. NoSymlinkFollow to AT_SYMLINK_FOLLOW,
which just cannot work for linkat, one must migrate to the empty
flags instead. That nix drops a safer type here seems a bit odd
though.
[0]: https://docs.rs/nix/0.26.1/src/nix/unistd.rs.html#1262-1263
Report: https://forum.proxmox.com/168633/
Fixes:
|
||
|---|---|---|
| .. | ||
| pxar | ||
| tools | ||
| backup_reader.rs | ||
| backup_repo.rs | ||
| backup_specification.rs | ||
| backup_stats.rs | ||
| backup_writer.rs | ||
| catalog_shell.rs | ||
| chunk_stream.rs | ||
| http_client.rs | ||
| inject_reused_chunks.rs | ||
| lib.rs | ||
| merge_known_chunks.rs | ||
| pipe_to_stream.rs | ||
| pxar_backup_stream.rs | ||
| remote_chunk_reader.rs | ||
| task_log.rs | ||
| vsock_client.rs | ||