Remove interface filter

There are a number of cases where the interface filter causes some
confusion.  Not exposing org.freedesktop.DBus.ObjectManager interfaces
caused some confusion around collections of objects, and the ability to
search for sensors.  Also, objects where the "parent" object has no
useful interfaces leads to some question about how things like
GetSubTree should behave in this condition.

This patchset removes the interface filter alltogether.  The only
negatives should be a slightly increased memory usage, and extra
interface support in mapperx.

On a positive, it makes it a lot less likely to see bugs where the
blacklists are concerned.

Change-Id: I1ffd17106d0c659dd2f438fe25c2d6832a248987
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/src/main.cpp b/src/main.cpp
index eb97caa..95c9acd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -45,7 +45,6 @@
 
 static boost::container::flat_set<std::string> service_whitelist;
 static boost::container::flat_set<std::string> service_blacklist;
-static boost::container::flat_set<std::string> iface_whitelist;
 
 /** Exception thrown when a path is not found in the object list. */
 struct NotFoundException final : public sdbusplus::exception_t
@@ -171,10 +170,6 @@
 #endif
 };
 
-static const boost::container::flat_set<std::string> ignored_interfaces{
-    "org.freedesktop.DBus.Introspectable", "org.freedesktop.DBus.Peer",
-    "org.freedesktop.DBus.Properties"};
-
 void addAssociation(sdbusplus::asio::object_server& objectServer,
                     const std::vector<Association>& associations,
                     const std::string& path)
@@ -353,17 +348,8 @@
 
                 std::string iface{iface_name};
 
-                if (((ignored_interfaces.find(iface) ==
-                      ignored_interfaces.end()) &&
-                     (std::find_if(iface_whitelist.begin(),
-                                   iface_whitelist.end(),
-                                   [iface](const auto& prefix) {
-                                       return boost::starts_with(iface, prefix);
-                                   }) != iface_whitelist.end())) ||
-                    (iface == "org.freedesktop.DBus.ObjectManager"))
-                {
-                    thisPathMap[transaction->process_name].emplace(iface_name);
-                }
+                thisPathMap[transaction->process_name].emplace(iface_name);
+
                 if (std::strcmp(iface_name, ASSOCIATIONS_INTERFACE) == 0)
                 {
                     do_associations(system_bus, objectServer,
@@ -551,9 +537,13 @@
         std::make_shared<sdbusplus::asio::connection>(io);
 
     splitArgs(options["service-namespaces"], service_whitelist);
-    splitArgs(options["interface-namespaces"], iface_whitelist);
     splitArgs(options["service-blacklists"], service_blacklist);
 
+    // TODO(Ed) Remove this once all service files are updated to not use this.
+    // For now, simply squash the input, and ignore it.
+    boost::container::flat_set<std::string> iface_whitelist;
+    splitArgs(options["interface-namespaces"], iface_whitelist);
+
     system_bus->request_name(OBJECT_MAPPER_DBUS_NAME);
     sdbusplus::asio::object_server server(system_bus);