1
0
mirror of https://github.com/systemd/systemd synced 2024-07-01 07:34:28 +00:00

core/exec-invoke: respect needs_sandboxing for PrivateTmp

Follow-up for 0e551b04ef
This commit is contained in:
Mike Yuan 2024-06-18 15:56:45 +02:00
parent 5f460ae1c2
commit 335b14ade5
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3

View File

@ -3205,8 +3205,6 @@ static int apply_mount_namespace(
.temporary_filesystems = context->temporary_filesystems,
.n_temporary_filesystems = context->n_temporary_filesystems,
.private_tmp = context->private_tmp,
.mount_images = context->mount_images,
.n_mount_images = context->n_mount_images,
.mount_image_policy = context->mount_image_policy ?: &image_policy_service,
@ -3245,6 +3243,7 @@ static int apply_mount_namespace(
.private_dev = needs_sandboxing && context->private_devices,
.private_network = needs_sandboxing && exec_needs_network_namespace(context),
.private_ipc = needs_sandboxing && exec_needs_ipc_namespace(context),
.private_tmp = needs_sandboxing ? context->private_tmp : false,
.mount_apivfs = needs_sandboxing && exec_context_get_effective_mount_apivfs(context),