diff options
Diffstat (limited to 'init/service_parser.cpp')
-rw-r--r-- | init/service_parser.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/init/service_parser.cpp b/init/service_parser.cpp index 97621dac6..57c311a52 100644 --- a/init/service_parser.cpp +++ b/init/service_parser.cpp @@ -657,6 +657,14 @@ Result<void> ServiceParser::EndSection() { << "' with a config in APEX"; } + std::string context = service_->subcontext() ? service_->subcontext()->context() : ""; + std::string old_context = + old_service->subcontext() ? old_service->subcontext()->context() : ""; + if (context != old_context) { + return Error() << "service '" << service_->name() << "' overrides another service " + << "across the treble boundary."; + } + service_list_->RemoveService(*old_service); old_service = nullptr; } |