1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

core: don't forget about fallback_smack_process_label

Call setup_smack() also when only fallback_smack_process_label is set.

Fixes: 75689fb2d4
This commit is contained in:
Łukasz Stelmach 2024-10-23 12:58:36 +02:00 committed by Yu Watanabe
parent b6b8527cd1
commit 20bbf5ee4c

View File

@ -4995,7 +4995,7 @@ int exec_invoke(
#if ENABLE_SMACK
/* LSM Smack needs the capability CAP_MAC_ADMIN to change the current execution security context of the
* process. This is the latest place before dropping capabilities. Other MAC context are set later. */
if (use_smack && context->smack_process_label) {
if (use_smack) {
r = setup_smack(params, context, executable_fd);
if (r < 0 && !context->smack_process_label_ignore) {
*exit_status = EXIT_SMACK_PROCESS_LABEL;