diff options
Diffstat (limited to 'load-dropin.c')
-rw-r--r-- | load-dropin.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/load-dropin.c b/load-dropin.c index b975d83f04..a57bfc455b 100644 --- a/load-dropin.c +++ b/load-dropin.c @@ -5,6 +5,7 @@ #include "unit.h" #include "load-dropin.h" +#include "log.h" int unit_load_dropin(Unit *u) { Iterator i; @@ -51,6 +52,12 @@ int unit_load_dropin(Unit *u) { return -ENOMEM; } + if (!unit_name_is_valid(de->d_name)) { + log_info("Name of %s is not a valid unit name. Ignoring.", path); + free(path); + continue; + } + r = manager_load_unit(u->meta.manager, path, &other); free(path); |