Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
daemon: Always create tempfiles in target dir
When we go to write a file, we need to create the temporary file in the exact target directory, not (potentially) `/tmp`. This will ensure that the right SELinux label is used by default. Currently the `renameio` library's logic tries to optimize things by using `/tmp` if possible, otherwise the target directory. And without SELinux that's a sane optimization. But we can't do it. Force using the target directory by passing it explicitly. Should fix a bug seen with the baremetal config which ended up with a `tmp_t` labeled file in `/etc`.
- Loading branch information