From: Luca Boccassi Date: Wed, 8 Nov 2023 15:24:17 +0000 (+0000) Subject: core: call mac_init from sd-executor X-Git-Tag: v255-rc2~77 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e34435857e9855bfbe8b62c4414f86a041e47234;p=thirdparty%2Fsystemd.git core: call mac_init from sd-executor Before the split the SELinux database was inherited via CoW. Since the split we need to reopen it. Follow-up for bb5232b6a3b8af --- diff --git a/src/core/executor.c b/src/core/executor.c index e19e8718162..86fbaef3470 100644 --- a/src/core/executor.c +++ b/src/core/executor.c @@ -15,6 +15,7 @@ #include "fd-util.h" #include "fileio.h" #include "getopt-defs.h" +#include "label-util.h" #include "parse-util.h" #include "pretty-print.h" #include "static-destruct.h" @@ -198,6 +199,10 @@ int main(int argc, char *argv[]) { log_set_prohibit_ipc(true); log_setup(); + r = mac_init(); + if (r < 0) + return log_error_errno(r, "Failed to initialize MAC layer: %m"); + r = fdset_new_fill(/* filter_cloexec= */ 0, &fdset); if (r < 0) return log_error_errno(r, "Failed to create fd set: %m");