machined: Don't insist on 0:0 for the state directory

We now support running machined unprivileged, so don't pass in 0:0
as the uid/gid unconditionally but just use the UID/GID we're running
as.
This commit is contained in:
Daan De Meyer
2026-01-12 19:08:00 +01:00
committed by Daan De Meyer
parent 7bf0d0c46e
commit e901e256d9
+1 -1
View File
@@ -176,7 +176,7 @@ int machine_save(Machine *m) {
return log_oom();
}
r = mkdir_safe_label(m->manager->state_dir, 0755, 0, 0, MKDIR_WARN_MODE);
r = mkdir_safe_label(m->manager->state_dir, 0755, UID_INVALID, GID_INVALID, MKDIR_WARN_MODE);
if (r < 0)
return log_error_errno(r, "Failed to create '%s': %m", m->manager->state_dir);