summaryrefslogtreecommitdiff
path: root/src/machine/machined.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/machine/machined.c')
-rw-r--r--src/machine/machined.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/machine/machined.c b/src/machine/machined.c
index 109bab76c5..9b9a334838 100644
--- a/src/machine/machined.c
+++ b/src/machine/machined.c
@@ -118,6 +118,9 @@ int manager_enumerate_machines(Manager *m) {
if (startswith(de->d_name, "unit:"))
continue;
+ if (!machine_name_is_valid(de->d_name))
+ continue;
+
k = manager_add_machine(m, de->d_name, &machine);
if (k < 0) {
log_error_errno(k, "Failed to add machine by file name %s: %m", de->d_name);