Skip to content
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

Fix double mount issue for /var/log and /var/tmp #134

Merged
merged 1 commit into from Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions usr/bin/remount-secure
Expand Up @@ -232,14 +232,6 @@ _tmp() {
remount_secure
}

_var() {
mount_folder="$NEWROOT/var"
## noexec: Not possible. Reason:
## Debian stores executable maintainer scripts in /var/lib/dpkg/info folder.
intended_mount_options="nosuid,nodev"
remount_secure
}

_var_tmp() {
mount_folder="$NEWROOT/var/tmp"
intended_mount_options="nosuid,nodev${most_noexec_maybe}"
Expand All @@ -252,6 +244,14 @@ _var_log() {
remount_secure
}

_var() {
mount_folder="$NEWROOT/var"
## noexec: Not possible. Reason:
## Debian stores executable maintainer scripts in /var/lib/dpkg/info folder.
intended_mount_options="nosuid,nodev"
remount_secure
}

_lib() {
mount_folder="$NEWROOT/lib"
## Cannot use noexec on /lib as per:
Expand Down Expand Up @@ -289,9 +289,9 @@ main() {
_dev
_dev_shm
_tmp
_var
_var_tmp
_var_log
_var
_home

end
Expand Down