machined mini tweaks (#38226)

This commit is contained in:
Lennart Poettering
2025-07-15 14:33:44 +02:00
committed by GitHub
4 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ strategies to avoid these issues:
the sticky bit has a different meaning for them.
6. Don't use `/tmp/` or `/var/tmp/`, but use your own sub-directory under
`/run/` or `$XDG_RUNTIME_DIRECTORY` (the former if privileged, the latter if
`/run/` or `$XDG_RUNTIME_DIR` (the former if privileged, the latter if
unprivileged), or `/var/lib/` and `~/.config/` (similar, but with
persistency and suitable for larger data). The two temporary directories
`/tmp/` and `/var/tmp/` come with the implicit clean-up semantics described
+1 -1
View File
@@ -1569,7 +1569,7 @@ static int setup_environment(
/* Also create a per-area subdirectory for $XDG_RUNTIME_DIR, so that each area has their own
* set of runtime services. We follow the same directory structure as for $HOME. Note that we
* do not define any form of automatic clean-up for the per-aera subdirs beyond the regular
* clean-up of the whole $XDG_RUNTIME_DIRECTORY hierarchy when the user finally logs out. */
* clean-up of the whole $XDG_RUNTIME_DIR hierarchy when the user finally logs out. */
r = make_area_runtime_directory(handle, ur, runtime_directory, area, &per_area_runtime_directory);
if (r != PAM_SUCCESS)
+2 -2
View File
@@ -1605,8 +1605,8 @@ int machine_open_root_directory(Machine *machine) {
static const char* const machine_class_table[_MACHINE_CLASS_MAX] = {
[MACHINE_CONTAINER] = "container",
[MACHINE_VM] = "vm",
[MACHINE_HOST] = "host",
[MACHINE_VM] = "vm",
[MACHINE_HOST] = "host",
};
DEFINE_STRING_TABLE_LOOKUP(machine_class, MachineClass);
+2 -4
View File
@@ -198,15 +198,13 @@ static int manager_enumerate_machines(Manager *m) {
k = manager_add_machine(m, de->d_name, &machine);
if (k < 0) {
r = log_error_errno(k, "Failed to add machine by file name %s: %m", de->d_name);
RET_GATHER(r, log_error_errno(k, "Failed to add machine by file name %s: %m", de->d_name));
continue;
}
machine_add_to_gc_queue(machine);
k = machine_load(machine);
if (k < 0)
r = k;
RET_GATHER(r, machine_load(machine));
}
return r;