From 9b7ce1b5ad8b48babd79c5199bd9e23e8065bb7c Mon Sep 17 00:00:00 2001 From: Teddy Reed Date: Mon, 24 Jul 2017 00:26:19 -0700 Subject: [PATCH] logger: Fail all plugins if any fail (#3488) --- osquery/registry/registry.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osquery/registry/registry.cpp b/osquery/registry/registry.cpp index 0e926048..f26dd688 100644 --- a/osquery/registry/registry.cpp +++ b/osquery/registry/registry.cpp @@ -77,7 +77,7 @@ Status RegistryInterface::setActive(const std::string& item_name) { } } - Status status(0, "OK"); + Status status; active_ = item_name; // The active plugin is setup when initialized. for (const auto& item : osquery::split(item_name, ",")) { @@ -90,6 +90,10 @@ Status RegistryInterface::setActive(const std::string& item_name) { // start their extension socket. status = pingExtension(getExtensionSocket(external_.at(item_name))); } + + if (!status.ok()) { + break; + } } return status; }