chiark / gitweb /
machined: ignore spurious error
[elogind.git] / src / login / logind-dbus.c
index 48395f6f949c8a064c913013c1bfdbb03fedbf56..bbb4ae2de66a912168a68bf5c658551f4f95c815 100644 (file)
@@ -23,7 +23,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <pwd.h>
-#include <sys/capability.h>
 
 #include "sd-id128.h"
 #include "sd-messages.h"
 #include "audit.h"
 #include "bus-util.h"
 #include "bus-error.h"
-#include "logind.h"
 #include "bus-common-errors.h"
 #include "udev-util.h"
+#include "selinux-util.h"
+#include "logind.h"
 
 static int property_get_idle_hint(
                 sd_bus *bus,
@@ -727,7 +727,7 @@ static int method_create_session(sd_bus *bus, sd_bus_message *message, void *use
 
         /* Now, let's wait until the slice unit and stuff got
          * created. We send the reply back from
-         * session_send_create_reply().*/
+         * session_send_create_reply(). */
 
         return 1;
 
@@ -2111,9 +2111,10 @@ int match_properties_changed(sd_bus *bus, sd_bus_message *message, void *userdat
                 return 0;
 
         r = unit_name_from_dbus_path(path, &unit);
+        if (r == -EINVAL) /* not a unit */
+                return 0;
         if (r < 0)
-                /* quietly ignore non-units paths */
-                return r == -EINVAL ? 0 : r;
+                return r;
 
         session = hashmap_get(m->session_units, unit);
         if (session)