Record the real uid and gid of backed-up files (closes #216)
The scanner read uid and gid by asserting the stat result to an interface with Uid() and Gid() methods. *syscall.Stat_t has Uid and Gid fields, not methods, so the assertion never matched and every file, directory and symlink was stored as 0:0; a restore as root then gave everything to root. The scanner now reads the fields of *syscall.Stat_t. The first backup after this change re-reads every file not owned by root, because its stored uid and gid no longer match the disk. When the tests run as root, as in the Docker build, the new test compares 0 with 0 and cannot catch the defect; a non-root run does. Model: opus-5-5
This commit was merged in pull request #241.
This commit is contained in:
@@ -22,6 +22,14 @@ the tag exists and is exercised; what is left is merging `next` to
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-06: Made a backup record the real uid and gid of files,
|
||||
directories and symlinks
|
||||
([issue #216](https://git.eeqj.de/sneak/vaultik/issues/216)). The
|
||||
scanner asked the stat result for `Uid()` and `Gid()` methods, which
|
||||
`*syscall.Stat_t` does not have, so every entry was stored as `0:0`
|
||||
and a restore as root gave every file to root. It now reads the
|
||||
`Uid` and `Gid` fields of `*syscall.Stat_t`.
|
||||
|
||||
- 2026-10-06: Made a `file://` destination whose directory is missing
|
||||
count as one that cannot be listed
|
||||
([issue #220](https://git.eeqj.de/sneak/vaultik/issues/220)). The file
|
||||
|
||||
Reference in New Issue
Block a user