]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: ignore failure on setting smack process label when allowed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 1 Nov 2021 04:48:32 +0000 (13:48 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 1 Nov 2021 08:46:01 +0000 (08:46 +0000)
src/core/execute.c

index 52a4daf0cb6d60e8aad85a30b781cb1ffa133d8a..bf4a66e3bd55f1ab3dc8d1b6f57381208667c1db 100644 (file)
@@ -4613,7 +4613,7 @@ static int exec_child(
                  * process. This is the latest place before dropping capabilities. Other MAC context are set later. */
                 if (use_smack) {
                         r = setup_smack(context, executable_fd);
-                        if (r < 0) {
+                        if (r < 0 && !context->smack_process_label_ignore) {
                                 *exit_status = EXIT_SMACK_PROCESS_LABEL;
                                 return log_unit_error_errno(unit, r, "Failed to set SMACK process label: %m");
                         }