-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating /.autorelabel must cause a Qubes OS VM to relabel everything, as otherwise users will not be able to troubleshoot their systems and upstream packages that create it will break. However, it was ignored, so fix that. Furthermore, relabel the filesystem of a TemplateBasedVM whenever its TemplateVM has been relabeled since the TemplateBasedVM was. This ensures that policy changes propagate to TemplateBasedVMs too.
- Loading branch information
Showing
4 changed files
with
12 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash -- | ||
set -eu | ||
if [ /.qubes-relabeled -nt /rw/.autorelabel ]; then | ||
restorecon -RF /rw /home /usr/local | ||
touch /rw/.autorelabel | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
[Unit] | ||
Description=Relabel /rw and /home | ||
After=qubes-mount-dirs.service qubes-sysinit.service | ||
Requires=qubes-mount-dirs.service qubes-sysinit.service | ||
After=qubes-mount-dirs.service qubes-sysinit.service qubes-relabel-root.service | ||
Requires=qubes-mount-dirs.service qubes-sysinit.service qubes-relabel-root.service | ||
ConditionSecurity=selinux | ||
ConditionPathExists=!/rw/.autorelabel | ||
DefaultDependencies=no | ||
Conflicts=selinux-autorelabel.service | ||
Before=local-fs.target rw.mount home.mount qubes-gui-agent.service qubes-qrexec-agent.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/usr/sbin/restorecon -RF /rw /home /usr/local | ||
ExecStart=/bin/touch /rw/.autorelabel | ||
ExecStart=/usr/lib/qubes/init/relabel-rw.sh | ||
|
||
[Install] | ||
WantedBy=multi-user.target |