diff --git a/src/shared/file.c b/src/shared/file.c index e772926..65e1c50 100644 --- a/src/shared/file.c +++ b/src/shared/file.c @@ -848,8 +848,8 @@ static void restore_extra_fd(int fd, const FileMetadata* metadata, const FileXat (uint32_t)metadata->mode, metadata->mtime_sec, metadata->mtime_nsec); /* Replay: re-apply the recorded uid/gid/mode/mtime fd-relative so a save under --fake-super restores the attrs (when privileged) instead of only - recording them. Best-effort; a non-root fchown failure is logged/skipped - by fake_super_restore_fd, never fatal. */ + recording them. Best-effort; fake_super_restore_fd silently skips a + non-root fchown EPERM/EACCES and never fatal. */ fake_super_restore_fd(fd); } } diff --git a/src/shared/xattr.c b/src/shared/xattr.c index be4c3d0..4dd9b51 100644 --- a/src/shared/xattr.c +++ b/src/shared/xattr.c @@ -335,8 +335,9 @@ void fake_super_store_fd(int fd, uint32_t uid, uint32_t gid, uint32_t mode, int6 /* --fake-super replay: read the freshly-stored record and re-apply the source * stat fd-relative. A privileged (root) run can actually change the owner; - * a non-root run logs-and-skips the fchown (never fatal, mirroring the normal - * metadata identity path) and still applies mode/mtime where permitted. */ + * a non-root run silently skips the fchown on EPERM/EACCES (never fatal, + * mirroring the normal metadata identity path; other errors are logged) and + * still applies mode/mtime where permitted. */ bool fake_super_restore_fd(int fd) { if (fd < 0) return false;