namespace: move protect_{home|system} into NamespaceInfo

it's not entirely clear what shall be passed via parameter and what via
struct, but these two definitely fit well with the other protect_xyz
fields, hence let's move them over.

We probably should move a lot more more fields into the structure
actuall (most? all even?).
This commit is contained in:
Lennart Poettering
2020-08-24 20:10:30 +02:00
parent 68dd195c1b
commit 52b3d6523f
5 changed files with 16 additions and 25 deletions
+2 -2
View File
@@ -2650,6 +2650,8 @@ static int apply_mount_namespace(
.protect_hostname = context->protect_hostname,
.mount_apivfs = context->mount_apivfs,
.private_mounts = context->private_mounts,
.protect_home = context->protect_home,
.protect_system = context->protect_system,
};
} else if (!context->dynamic_user && root_dir)
/*
@@ -2680,8 +2682,6 @@ static int apply_mount_namespace(
tmp_dir,
var_tmp_dir,
context->log_namespace,
needs_sandboxing ? context->protect_home : PROTECT_HOME_NO,
needs_sandboxing ? context->protect_system : PROTECT_SYSTEM_NO,
context->mount_flags,
context->root_hash, context->root_hash_size, context->root_hash_path,
context->root_hash_sig, context->root_hash_sig_size, context->root_hash_sig_path,