]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/manager.c
core: implement /run/systemd/units/-based path for passing unit info from PID 1 to...
[thirdparty/systemd.git] / src / core / manager.c
index 9978be7a4807689104aa76e33783385cfbb26931..ecb87167fa43ab5a60aedfaa3b27a065fd96beee 100644 (file)
 #include "dirent-util.h"
 #include "env-util.h"
 #include "escape.h"
-#include "execute.h"
 #include "exec-util.h"
+#include "execute.h"
 #include "exit-status.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "fs-util.h"
 #include "hashmap.h"
 #include "io-util.h"
+#include "label.h"
 #include "locale-setup.h"
 #include "log.h"
 #include "macro.h"
@@ -714,6 +715,12 @@ int manager_new(UnitFileScope scope, unsigned test_run_flags, Manager **_m) {
                 goto fail;
         }
 
+        if (MANAGER_IS_SYSTEM(m)) {
+                r = mkdir_label("/run/systemd/units", 0755);
+                if (r < 0 && r != -EEXIST)
+                        goto fail;
+        }
+
         /* Note that we do not set up the notify fd here. We do that after deserialization,
          * since they might have gotten serialized across the reexec. */