- /* we can't represent > 32-bit pids; if your system needs them, please
- * add ProcessID64 to the spec or something */
- if (dbus_connection_get_unix_process_id (conn, &ulong_val) &&
- ulong_val <= _DBUS_UINT32_MAX)
+#ifdef ENABLE_KDBUS_TRANSPORT
+ if(!bus_context_is_kdbus(bus_transaction_get_context (transaction)))
+ {
+#endif
+ conn = bus_driver_get_conn_helper (connection, message, "credentials",
+ &service, error);
+
+ if (conn == NULL)
+ goto failed;
+
+ /* we can't represent > 32-bit pids; if your system needs them, please
+ * add ProcessID64 to the spec or something */
+ if (dbus_connection_get_unix_process_id (conn, &ulong_val) &&
+ ulong_val <= _DBUS_UINT32_MAX)
+ {
+ if (!_dbus_asv_add_uint32 (&array_iter, "ProcessID", ulong_val))
+ goto oom;
+ }
+
+ /* we can't represent > 32-bit uids; if your system needs them, please
+ * add UnixUserID64 to the spec or something */
+ if (dbus_connection_get_unix_user (conn, &ulong_val) &&
+ ulong_val <= _DBUS_UINT32_MAX)
+ {
+ if (!_dbus_asv_add_uint32 (&array_iter, "UnixUserID", ulong_val))
+ goto oom;
+ }
+#ifdef ENABLE_KDBUS_TRANSPORT
+ }
+ else