From 201dd6d94049d8f2ee8489f354f097f80c110ea0 Mon Sep 17 00:00:00 2001 From: Teddy Reed Date: Fri, 18 May 2018 06:58:59 -0400 Subject: [PATCH] packs: Fix blacklist option bool assumption (#4400) --- osquery/config/packs.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osquery/config/packs.cpp b/osquery/config/packs.cpp index 89d5eb07..ca6a9be7 100644 --- a/osquery/config/packs.cpp +++ b/osquery/config/packs.cpp @@ -221,9 +221,11 @@ void Pack::initialize(const std::string& name, } else { query.options["removed"] = JSON::valueToBool(q.value["removed"]); } - query.options["blacklist"] = (q.value.HasMember("blacklist")) - ? q.value["blacklist"].GetBool() - : true; + + query.options["blacklist"] = true; + if (q.value.HasMember("blacklist")) { + query.options["blacklist"] = JSON::valueToBool(q.value["blacklist"]); + } schedule_.emplace(std::make_pair(q.name.GetString(), std::move(query))); }