forked from coreos/ignition
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We shouldn't need to run `setfiles` with `-i`, which causes `setfiles` to ignore files that do not exist. All the files which we pass to `setfiles` should exist, and it should be a hard error if `setfiles` fails to find and relabel the file we wrote. This dates from coreos#632, where we added `/var/home` and `/var/roothome` for OSTree-based systems. We actually don't need to special-case OSTree systems at all anymore. The `/var/home` and `/var/roothome` directories themselves are now handled by `ignition-ostree-populate-var.service`. All we need to take care of here is to relabel the homedir files we created or modified for each user. Because `setfiles` by default doesn't follow the final symlink, we also add a check here to relabel the target if the homedir is a link. (Ideally, we'd change the home directory of `root `to be `/var/roothome` like we do in rpm-ostree based systems for regular users: coreos/rpm-ostree#1726, but it's probably not worth the ripples that would cause.)
- Loading branch information
Showing
3 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters