proxmox-backup/pbs-client/src
Thomas Lamprecht 7a5f194f00 pxar extract: linkat has no AT_SYMLINK_NOFOLLOW flag
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: 2a7012f96 ("update pbs-client to nix 0.29 and rustyline 0.14")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-07-19 20:00:14 +02:00
..
pxar pxar extract: linkat has no AT_SYMLINK_NOFOLLOW flag 2025-07-19 20:00:14 +02:00
tools pbs-client: allow reading fingerprint from system credential 2025-04-03 17:53:25 +02:00
backup_reader.rs client/server: use dedicated api type for all archive names 2024-11-22 13:47:05 +01:00
backup_repo.rs tree-wide: bump edition to 2021 2022-12-06 13:31:01 +01:00
backup_specification.rs client: align description for backup specification to docs 2025-03-20 18:47:44 +01:00
backup_stats.rs client: backup writer: refactor backup and upload stats counters 2024-11-21 10:14:53 +01:00
backup_writer.rs Revert "h2: switch to legacy feature" 2025-06-16 13:59:37 +02:00
catalog_shell.rs update pbs-client to nix 0.29 and rustyline 0.14 2025-06-16 13:59:37 +02:00
chunk_stream.rs client: chunk stream: switch payload stream chunker 2024-06-05 16:39:42 +02:00
http_client.rs pbs-client: update crt-static code to hyper 1 2025-06-16 13:59:37 +02:00
inject_reused_chunks.rs client: backup writer: refactor backup and upload stats counters 2024-11-21 10:14:53 +01:00
lib.rs client: backup writer: allow push uploading index and chunks 2024-11-21 10:14:53 +01:00
merge_known_chunks.rs cargo: switch from proc-macro pin-project to declarative pin-project-lite 2021-09-22 11:15:40 +02:00
pipe_to_stream.rs Revert "h2: switch to legacy feature" 2025-06-16 13:59:37 +02:00
pxar_backup_stream.rs client: pxar: fix race in pxar backup stream 2025-02-11 11:18:29 +01:00
remote_chunk_reader.rs blob/chunk parse errors: add context 2023-08-08 13:57:04 +02:00
task_log.rs pbs-client: remove log dependency and migrate to tracing 2024-12-05 08:31:52 +01:00
vsock_client.rs update pbs-client to nix 0.29 and rustyline 0.14 2025-06-16 13:59:37 +02:00