docs(p7-output-fs): align fake-super comments with silent EPERM/EACCES skip (re-review nit)

This commit is contained in:
2026-09-12 10:31:56 +02:00
parent f2ba8211ce
commit a539d8b2ba
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -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); (uint32_t)metadata->mode, metadata->mtime_sec, metadata->mtime_nsec);
/* Replay: re-apply the recorded uid/gid/mode/mtime fd-relative so a save /* 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 under --fake-super restores the attrs (when privileged) instead of only
recording them. Best-effort; a non-root fchown failure is logged/skipped recording them. Best-effort; fake_super_restore_fd silently skips a
by fake_super_restore_fd, never fatal. */ non-root fchown EPERM/EACCES and never fatal. */
fake_super_restore_fd(fd); fake_super_restore_fd(fd);
} }
} }
+3 -2
View File
@@ -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 /* --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; * 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 * a non-root run silently skips the fchown on EPERM/EACCES (never fatal,
* metadata identity path) and still applies mode/mtime where permitted. */ * mirroring the normal metadata identity path; other errors are logged) and
* still applies mode/mtime where permitted. */
bool fake_super_restore_fd(int fd) { bool fake_super_restore_fd(int fd) {
if (fd < 0) if (fd < 0)
return false; return false;