Revert "Add option to enable global namespace (#497)"

This reverts commit f81caf75a9.
This commit is contained in:
tiann
2023-05-16 22:27:01 +08:00
parent 08d9e5d6bc
commit b80e06256d
2 changed files with 1 additions and 8 deletions

View File

@@ -229,10 +229,7 @@ pub fn root_shell() -> Result<()> {
// switch to global mount namespace
#[cfg(any(target_os = "linux", target_os = "android"))]
let global_namespace_enable =
std::fs::read_to_string("/sys/module/ksu/parameters/global_namespace_enable")
.unwrap_or("0".to_string());
if global_namespace_enable.trim() == "1" || mount_master {
if mount_master {
let _ = utils::switch_mnt_ns(1);
let _ = utils::unshare_mnt_ns();
}