* In command lines, support both "$FOO" and $FOO
* /etc must always take precedence even if we follow symlinks!
-* fix merging of device units
* color aus bei stdout auf !tty
-getty before prefdm
-
-* /lib/init/rw
-
* vielleicht implizit immer auf syslog dependen?
* debian deadlock when partition auf noauto is.
assert(_f);
assert(_fds);
- if ((r = manager_open_serialization(&f)) < 0) {
+ if ((r = manager_open_serialization(m, &f)) < 0) {
log_error("Failed to create serialization faile: %s", strerror(-r));
goto fail;
}
UNIT_VTABLE(u)->bus_query_pid_done(u, name, pid);
}
-int manager_open_serialization(FILE **_f) {
+int manager_open_serialization(Manager *m, FILE **_f) {
char *path;
mode_t saved_umask;
int fd;
assert(_f);
- if (asprintf(&path, "/dev/shm/systemd-%u.dump-XXXXXX", (unsigned) getpid()) < 0)
- return -ENOMEM;
+ if (m->running_as == MANAGER_SYSTEM) {
+ mkdir_p("/dev/.systemd", 0755);
+
+ if (asprintf(&path, "/dev/.systemd/dump-%lu-XXXXXX", (unsigned long) getpid()) < 0)
+ return -ENOMEM;
+ } else {
+ if (asprintf(&path, "/tmp/systemd-dump-%lu-XXXXXX", (unsigned long) getpid()) < 0)
+ return -ENOMEM;
+ }
saved_umask = umask(0077);
fd = mkostemp(path, O_RDWR|O_CLOEXEC);
assert(m);
- if ((r = manager_open_serialization(&f)) < 0)
+ if ((r = manager_open_serialization(m, &f)) < 0)
return r;
if (!(fds = fdset_new())) {
void manager_dispatch_bus_name_owner_changed(Manager *m, const char *name, const char* old_owner, const char *new_owner);
void manager_dispatch_bus_query_pid_done(Manager *m, const char *name, pid_t pid);
-int manager_open_serialization(FILE **_f);
+int manager_open_serialization(Manager *m, FILE **_f);
int manager_serialize(Manager *m, FILE *f, FDSet *fds);
int manager_deserialize(Manager *m, FILE *f, FDSet *fds);