mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-07-27 08:36:35 +00:00
pxar: extract: make invalid ACLs non-fatal
these can occur in practice, and neither setting nor getting them throws an error. if "invalid" ACLs are non-restorable, this means that creating a pxar archive with such an ACL is possible, but restoring it isn't. reported in our community forum: https://forum.proxmox.com/threads/155477 Tested-by: Gabriel Goller <g.goller@proxmox.com> Acked-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
4e37c678dc
commit
cbf7bbefb7
@ -2,7 +2,7 @@ use std::ffi::{CStr, CString};
|
||||
use std::os::unix::io::{AsRawFd, RawFd};
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::{anyhow, bail, Context, Error};
|
||||
use anyhow::{anyhow, Context, Error};
|
||||
use nix::errno::Errno;
|
||||
use nix::fcntl::OFlag;
|
||||
use nix::sys::stat::Mode;
|
||||
@ -300,7 +300,7 @@ fn apply_acls(
|
||||
}
|
||||
|
||||
if !acl.is_valid() {
|
||||
bail!("Error while restoring ACL - ACL invalid");
|
||||
log::warn!("Warning: {path_info:?} - ACL invalid, attempting restore anyway..");
|
||||
}
|
||||
|
||||
acl.set_file(c_proc_path, acl::ACL_TYPE_ACCESS)?;
|
||||
@ -329,7 +329,7 @@ fn apply_acls(
|
||||
}
|
||||
|
||||
if !acl.is_valid() {
|
||||
bail!("Error while restoring ACL - ACL invalid");
|
||||
log::warn!("Warning: {path_info:?} - ACL invalid, attempting restore anyway..");
|
||||
}
|
||||
|
||||
acl.set_file(c_proc_path, acl::ACL_TYPE_DEFAULT)?;
|
||||
|
Loading…
Reference in New Issue
Block a user