Skip to content

Commit

Permalink
stages/files: don't relabel /home and /root symlinks
Browse files Browse the repository at this point in the history
On OSTree systems, those are just symlinks in the deployment root. If
they're not labeled correctly already, it signals an issue with the disk
creation process itself (and might also signal that the next time a
deployment root is created, it'll also be mislabeled).

Anyway, even on non-OSTree systems, it seems reasonable to expect that
`/home` and `/root` at least already exist and don't need to be created
(and thus don't need to be relabeld).

It's possible that [fixing `getxattr` without a policy
loaded](coreos/fedora-coreos-config#245 (comment))
would also fix this, since `setfiles` would see that the symlinks were
already correctly labeled.

In effect, this is completing what coreos#632 started.

Closes: coreos/fedora-coreos-tracker#339
  • Loading branch information
jlebon committed Dec 19, 2019
1 parent 40c0b57 commit de24319
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions internal/exec/stages/files/passwd.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ func (s *stage) createPasswd(config types.Config) error {
s.relabel(deglobbed...)
s.relabel(
"/etc/.pwd.lock",
"/home",
"/root",
// for OSTree-based systems (newer restorecon doesn't follow symlinks)
"/var/home",
"/var/roothome",
Expand Down

0 comments on commit de24319

Please sign in to comment.