init-storage: Copy file contexts from rootfs
Apparently, BusyBox's `cp` does NOT copy SELinux contexts when the `-a` argument is specified. This differs from GNU coreutils's `cp`, and explains why the files copied from the rootfs image to the persistent storage volume were not being labelled correctly. The `-c` argument is required. Now that files are labelled correctly when they are copied, the step to run `restorecon` is no longer necessary.
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
[Unit]
|
||||
Description=Restore SELinux file contexts in /var
|
||||
ConditionNeedsUpdate=/var
|
||||
DefaultDependencies=no
|
||||
After=local-fs.target
|
||||
Before=sysinit.target
|
||||
Before=systemd-tmpfiles-setup.service
|
||||
Before=systemd-update-done.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/restorecon -RFv /var
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
Reference in New Issue
Block a user