]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
bus_service_list_queued_owners: Don't return a DBusError
authorSimon McVittie <smcv@collabora.com>
Tue, 17 Apr 2018 11:48:23 +0000 (12:48 +0100)
committerSimon McVittie <smcv@collabora.com>
Thu, 21 Jun 2018 16:42:12 +0000 (17:42 +0100)
This makes it clearer that the only possible error is out-of-memory,
so its use in ListQueuedOwners() is not leaking information to callers
that might not be allowed to know the difference between "doesn't exist"
and "exists but you are not allowed to know that".

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105656

bus/driver.c
bus/services.c
bus/services.h

index a131170d957f7a1560fd109932f5e80856e2d84f..8015f28ba7d1b3013fd2129283a042cf884f4f4c 100644 (file)
@@ -1581,10 +1581,11 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection,
     }
   else
     {
-      if (!bus_service_list_queued_owners (service,
-                                           &base_names,
-                                           error))
-        goto failed;
+      if (!bus_service_list_queued_owners (service, &base_names))
+        {
+          BUS_SET_OOM (error);
+          goto failed;
+        }
     }
 
   _dbus_assert (base_names != NULL);
index 127edda0ecd9c30002a0049eb39318540970521c..b7a4fdfd2bde89e3995b0ae9f903314d7558b171 100644 (file)
@@ -1289,8 +1289,7 @@ bus_service_has_owner (BusService     *service,
 
 dbus_bool_t 
 bus_service_list_queued_owners (BusService *service,
-                                DBusList  **return_list,
-                                DBusError  *error)
+                                DBusList  **return_list)
 {
   DBusList *link;
 
@@ -1317,6 +1316,5 @@ bus_service_list_queued_owners (BusService *service,
   
  oom:
   _dbus_list_clear (return_list);
-  BUS_SET_OOM (error);
   return FALSE;
 }
index 056dd9faa4946934d274b5b62daeaaed2b12e857..4ec510f3853ec4c47990a31db849d9321b3508f4 100644 (file)
@@ -87,8 +87,7 @@ BusOwner*       bus_service_get_primary_owner         (BusService     *service);
 dbus_bool_t     bus_service_get_allow_replacement     (BusService     *service);
 const char*     bus_service_get_name                  (BusService     *service);
 dbus_bool_t     bus_service_list_queued_owners        (BusService *service,
-                                                       DBusList  **return_list,
-                                                       DBusError  *error);
+                                                       DBusList  **return_list);
 
 DBusConnection* bus_service_get_primary_owners_connection (BusService     *service);
 #endif /* BUS_SERVICES_H */