If a type=dir entry exists and all contents are directories, files
added with contents=, or symlinks with link= attributes then it doesn't
need to exist. Just let openat fail in that case. It's concivable
this will make debugging some cases weird, but it's sufficent to handle
the way we add /root/.ssh in CheriBSD VM images.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
To trigger the problem, a test case might do something like
./root/.ssh type=dir
./root/.ssh/id_ed25519 type=file contents=/path/to/key
where ./root/.ssh doesn't exist?
usr.sbin/makefs/zfs/fs.c | ||
---|---|---|
304 | Just return (openat(fd, path, flags)); |
Comment Actions
Yeah, that's the basic issue I ran into (in this case it was actually the authorized_keys file).