From: Chris Down Date: Thu, 17 Oct 2019 03:10:05 +0000 (-0400) Subject: Merge pull request #13743 from anitazha/dropin_all_the_things X-Git-Tag: v244-rc1~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=959daf9bfc6617169710ef226718be90ab9f9037;p=thirdparty%2Fsystemd.git Merge pull request #13743 from anitazha/dropin_all_the_things core: support top level drop-ins through -.service.d for service units --- 959daf9bfc6617169710ef226718be90ab9f9037 diff --cc src/core/service.c index 3713490c938,24ad1e77fa9..256ca46fd88 --- a/src/core/service.c +++ b/src/core/service.c @@@ -548,8 -548,15 +548,13 @@@ static int service_arm_timer(Service *s static int service_verify(Service *s) { assert(s); - - if (UNIT(s)->load_state != UNIT_LOADED) - return 0; + assert(UNIT(s)->load_state == UNIT_LOADED); + if (!service_unit_name_is_valid(UNIT(s)->id)) { + log_unit_error(UNIT(s), "Service name is invalid or reserved. Refusing."); + return -EINVAL; + } + if (!s->exec_command[SERVICE_EXEC_START] && !s->exec_command[SERVICE_EXEC_STOP] && UNIT(s)->success_action == EMERGENCY_ACTION_NONE) { /* FailureAction= only makes sense if one of the start or stop commands is specified.