mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
mount --make-private
https://github.com/Kicksecure/security-misc/issues/172
This commit is contained in:
parent
c0f98b05b6
commit
44a15cd97d
@ -187,12 +187,12 @@ remount_secure() {
|
|||||||
|
|
||||||
if findmnt --noheadings "$mount_folder" >/dev/null ; then
|
if findmnt --noheadings "$mount_folder" >/dev/null ; then
|
||||||
$output_command "INFO: '$mount_folder' already mounted, therefore using remount."
|
$output_command "INFO: '$mount_folder' already mounted, therefore using remount."
|
||||||
$output_command INFO: Executing: mount --options "remount,${intended_mount_options}" "$mount_folder"
|
$output_command INFO: Executing: mount --make-private --options "remount,${intended_mount_options}" "$mount_folder"
|
||||||
mount --options "remount,${intended_mount_options}" "$mount_folder" || exit_code=100
|
mount --make-private --options "remount,${intended_mount_options}" "$mount_folder" || exit_code=100
|
||||||
else
|
else
|
||||||
$output_command "INFO: '$mount_folder' not yet mounted, therefore using mount bind."
|
$output_command "INFO: '$mount_folder' not yet mounted, therefore using mount bind."
|
||||||
$output_command INFO: Executing: mount --options "$intended_mount_options" --bind "$mount_folder" "$mount_folder"
|
$output_command INFO: Executing: mount --make-private --options "$intended_mount_options" --bind "$mount_folder" "$mount_folder"
|
||||||
mount --options "$intended_mount_options" --bind "$mount_folder" "$mount_folder" || exit_code=101
|
mount --make-private --options "$intended_mount_options" --bind "$mount_folder" "$mount_folder" || exit_code=101
|
||||||
fi
|
fi
|
||||||
|
|
||||||
new_mount_options="$(findmnt --noheadings --output options -- "$mount_folder")" || true
|
new_mount_options="$(findmnt --noheadings --output options -- "$mount_folder")" || true
|
||||||
|
Loading…
Reference in New Issue
Block a user