-
Notifications
You must be signed in to change notification settings - Fork 56
Secure Remount Without Remounting At All For The Most Part - Secure Mount #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
b1825f1
home
monsieuremre 6038b7b
var
monsieuremre baa4f12
var-log
monsieuremre a25b341
var-tmp
monsieuremre 14464b1
var-log-audit
monsieuremre 2971646
tmp
monsieuremre 97fab96
boot
monsieuremre d84d5a5
boot-efi
monsieuremre 3fa857b
usr
monsieuremre 0212b4b
usr-share
monsieuremre 8be91a1
bind-directories.service
monsieuremre e1637b8
bind-directories
monsieuremre f18799f
fix unmount error
monsieuremre e270c61
more fix
monsieuremre 7518868
remount-api.service
monsieuremre 57211b1
remount-api
monsieuremre f976ebc
Delete usr/bin/bind-directories
monsieuremre bdfa883
Delete lib/systemd/system/bind-directories.service
monsieuremre b5245a4
var.mount
monsieuremre 1a60f90
var-tmp.mount
monsieuremre 3b635d4
var-log.mount
monsieuremre 64a9829
small fix
monsieuremre 7512e47
boot.mount
monsieuremre ee943a3
boot-efi.mount
monsieuremre 0b13416
tmp.mount
monsieuremre 1267cc8
usr.mount
monsieuremre daed18d
usr-share.mount
monsieuremre e13b39f
boot-efi not needed to be bound
monsieuremre 6bf357d
home.mount
monsieuremre 378c00e
fix
monsieuremre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,2 @@ | ||
| [Mount] | ||
| Options=nodev,noexec,nosuid | ||
This file contains hidden or 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,2 @@ | ||
| [Mount] | ||
| Options=nodev,noexec,nosuid |
This file contains hidden or 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,2 @@ | ||
| [Mount] | ||
| Options=nodev,nosuid |
This file contains hidden or 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,2 @@ | ||
| [Mount] | ||
| Options=nodev,noexec,nosuid |
This file contains hidden or 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,5 @@ | ||
| [Unit] | ||
| Before=usr.mount | ||
|
|
||
| [Mount] | ||
| Options=nodev,nosuid |
This file contains hidden or 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,2 @@ | ||
| [Mount] | ||
| Options=nodev |
2 changes: 2 additions & 0 deletions
2
etc/systemd/system/var-log-audit.mount.d/50_security-misc.conf
This file contains hidden or 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,2 @@ | ||
| [Mount] | ||
| Options=nodev,noexec,nosuid |
This file contains hidden or 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,5 @@ | ||
| [Unit] | ||
| Before=var.mount | ||
|
|
||
| [Mount] | ||
| Options=nodev,noexec,nosuid |
This file contains hidden or 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,2 @@ | ||
| [Mount] | ||
| Options=nodev,noexec,nosuid |
This file contains hidden or 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,2 @@ | ||
| [Mount] | ||
| Options=nodev,nosuid |
This file contains hidden or 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,10 @@ | ||
| [Unit] | ||
| Description=Bind Mount /boot with no dedicated partition | ||
|
|
||
| [Mount] | ||
| What=/boot | ||
| Where=/boot | ||
| Options=defaults,nodev,noexec,nosuid,bind | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit.target |
This file contains hidden or 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,10 @@ | ||
| [Unit] | ||
| Description=Bind Mount /home with no dedicated partition | ||
|
|
||
| [Mount] | ||
| What=/home | ||
| Where=/home | ||
| Options=defaults,nodev,nosuid,bind | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit.target |
This file contains hidden or 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,26 @@ | ||
| # https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/ | ||
| # When not editing fstab, some filesystems have to be remounted in order to be hardened | ||
|
|
||
| [Unit] | ||
| Description=Remounts what can not be mounted with secure options in the first run without having to edit fstab | ||
|
|
||
| Before=sysinit-post.target | ||
| Before=basic.target | ||
| Before=multi-user.target | ||
| Before=graphical.target | ||
| Before=getty-pre.target | ||
| Before=network-pre.target | ||
|
|
||
| After=local-fs.target | ||
| After=sysinit.target | ||
| After=qubes-sysinit.service | ||
|
|
||
| Requires=local-fs.target | ||
| Requires=sysinit.target | ||
|
|
||
| [Service] | ||
| Type=oneshot | ||
| ExecStart=remount-api | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit-post.target |
This file contains hidden or 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,10 @@ | ||
| [Unit] | ||
| Description=Bind Mount /tmp with no dedicated partition | ||
|
|
||
| [Mount] | ||
| What=tmpfs | ||
| Where=/tmp | ||
| Options=defaults,nodev,noexec,nosuid | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit.target |
This file contains hidden or 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,11 @@ | ||
| [Unit] | ||
| Description=Bind Mount /usr/share with no dedicated partition | ||
| Before=usr.mount | ||
|
|
||
| [Mount] | ||
| What=/usr/share | ||
| Where=/usr/share | ||
| Options=defaults,nodev,nosuid,bind | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit.target |
This file contains hidden or 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,10 @@ | ||
| [Unit] | ||
| Description=Bind Mount /usr with no dedicated partition | ||
|
|
||
| [Mount] | ||
| What=/usr | ||
| Where=/usr | ||
| Options=defaults,nodev,bind | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit.target |
This file contains hidden or 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,11 @@ | ||
| [Unit] | ||
| Description=Bind Mount /var/log with no dedicated partition | ||
| Before=var.mount | ||
|
|
||
| [Mount] | ||
| What=/var/log | ||
| Where=/var/log | ||
| Options=defaults,nodev,noexec,nosuid,bind | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit.target |
This file contains hidden or 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,10 @@ | ||
| [Unit] | ||
| Description=Bind Mount /var/tmp with no dedicated partition | ||
|
|
||
| [Mount] | ||
| What=/var/tmp | ||
| Where=/tmp | ||
| Options=defaults,nodev,noexec,nosuid,bind | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit.target |
This file contains hidden or 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,10 @@ | ||
| [Unit] | ||
| Description=Bind Mount /var with no dedicated partition | ||
|
|
||
| [Mount] | ||
| What=/var | ||
| Where=/var | ||
| Options=defaults,nodev,nosuid,bind | ||
|
|
||
| [Install] | ||
| WantedBy=sysinit.target |
This file contains hidden or 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,7 @@ | ||
| #!/bin/bash | ||
|
|
||
| ## This one seems to be superfluous because debian seems to mount run hardened anyway | ||
| # mount -o defaults,nodev,noexec,nosuid,remount /run | ||
|
|
||
| mount -o defaults,nodev,noexec,nosuid,remount /dev/shm | ||
| mount -o defaults,noexec,nosuid,remount /dev |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.