core: disallow using '-.service' as a service name

-.service.d will become a special top level drop in so don't let it be a
usable service name (otherwise the interaction gets complicated).
This commit is contained in:
Anita Zhang
2019-10-07 12:02:12 -07:00
parent 0490b44031
commit e23d911664
5 changed files with 55 additions and 0 deletions
+2
View File
@@ -58,6 +58,8 @@ static inline int unit_name_mangle(const char *name, UnitNameMangle flags, char
return unit_name_mangle_with_suffix(name, flags, ".service", ret);
}
bool service_unit_name_is_valid(const char *name);
int slice_build_parent_slice(const char *slice, char **ret);
int slice_build_subslice(const char *slice, const char *name, char **subslice);
bool slice_name_is_valid(const char *name);