mapper: remove configurable service allowlists

Remove the ability to specify an allow list at runtime.  Instead,
introspect any DBus service except those that start with
org.freedesktop.  This removes the need for argument parsing code and
complex bitbake metadata.

Skip org.freedesktop because applications (OpenBMC or otherwise) should
access org.freedesktop services directly and not indirectly via the
OpenBMC mapper.

Change-Id: I83038a121580dcde2a2b3b1f994b3066cc9d955f
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/src/processing.cpp b/src/processing.cpp
index 5a733d4..5590d16 100644
--- a/src/processing.cpp
+++ b/src/processing.cpp
@@ -1,7 +1,10 @@
 #include "processing.hpp"
 
+#include <algorithm>
+#include <array>
 #include <iostream>
 #include <string>
+#include <string_view>
 
 bool getWellKnown(
     const boost::container::flat_map<std::string, std::string>& owners,
@@ -23,15 +26,17 @@
     return true;
 }
 
-bool needToIntrospect(const std::string& processName,
-                      const AllowDenyList& allowList)
+bool needToIntrospect(const std::string& processName)
 {
-    auto inAllowList = std::find_if(allowList.begin(), allowList.end(),
-                                    [&processName](const auto& prefix) {
-                                        return processName.starts_with(prefix);
-                                    }) != allowList.end();
+    using namespace std::string_view_literals;
+    static constexpr std::array<std::string_view, 2> skipNamespaces{
+        ":"sv, "org.freedesktop"sv};
 
-    return inAllowList;
+    auto inSkipList = std::find_if(skipNamespaces.begin(), skipNamespaces.end(),
+                                   [&processName](auto prefix) {
+                                       return processName.starts_with(prefix);
+                                   }) != skipNamespaces.end();
+    return !(inSkipList || processName.empty());
 }
 
 void processNameChangeDelete(