mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-31 07:51:08 +03:00
Use bus_maybe_send_reply() where applicable
This is a followup to: commit 1a37b9b904
It will fix denial messages from dbus-daemon between gdm and
systemd-logind on logging into GNOME due to this.
See the previous commit for more details.
This commit is contained in:
parent
8cb17a6dc8
commit
c6a818c820
@ -116,7 +116,7 @@ static DBusHandlerResult bus_job_message_dispatch(Job *j, DBusConnection *connec
|
||||
return bus_default_message_handler(connection, message, INTROSPECTION, INTERFACES_LIST, bps);
|
||||
}
|
||||
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
return DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
@ -185,7 +185,7 @@ static DBusHandlerResult bus_job_message_handler(DBusConnection *connection, DBu
|
||||
|
||||
free(introspection);
|
||||
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
|
@ -1894,7 +1894,7 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
|
||||
}
|
||||
|
||||
if (reply)
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
|
@ -77,7 +77,7 @@ DBusHandlerResult bus_snapshot_message_handler(Unit *u, DBusConnection *c, DBusM
|
||||
return bus_default_message_handler(c, message, INTROSPECTION, INTERFACES_LIST, bps);
|
||||
}
|
||||
|
||||
if (!dbus_connection_send(c, reply, NULL))
|
||||
if (!bus_maybe_send_reply(c, message, reply))
|
||||
return DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
|
@ -582,7 +582,7 @@ static DBusHandlerResult bus_unit_message_dispatch(Unit *u, DBusConnection *conn
|
||||
}
|
||||
|
||||
if (reply)
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
@ -673,7 +673,7 @@ static DBusHandlerResult bus_unit_message_handler(DBusConnection *connection, DB
|
||||
|
||||
free(introspection);
|
||||
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
@ -886,7 +886,7 @@ DBusHandlerResult bus_unit_queue_job(
|
||||
DBUS_TYPE_INVALID))
|
||||
goto oom;
|
||||
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
|
@ -406,7 +406,7 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection *connection, DBus
|
||||
dbus_error_free(&error);
|
||||
|
||||
if (reply) {
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
dbus_message_unref(reply);
|
||||
|
@ -605,7 +605,7 @@ static DBusHandlerResult hostname_message_handler(
|
||||
if (!reply)
|
||||
goto oom;
|
||||
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
dbus_message_unref(reply);
|
||||
|
@ -1277,7 +1277,7 @@ static DBusHandlerResult locale_message_handler(
|
||||
if (!(reply = dbus_message_new_method_return(message)))
|
||||
goto oom;
|
||||
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
dbus_message_unref(reply);
|
||||
|
@ -310,7 +310,7 @@ static DBusHandlerResult seat_message_dispatch(
|
||||
}
|
||||
|
||||
if (reply) {
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
dbus_message_unref(reply);
|
||||
|
@ -412,7 +412,7 @@ static DBusHandlerResult session_message_dispatch(
|
||||
}
|
||||
|
||||
if (reply) {
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
dbus_message_unref(reply);
|
||||
|
@ -304,7 +304,7 @@ static DBusHandlerResult user_message_dispatch(
|
||||
}
|
||||
|
||||
if (reply) {
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
dbus_message_unref(reply);
|
||||
|
@ -889,7 +889,7 @@ static DBusHandlerResult timedate_message_handler(
|
||||
if (!(reply = dbus_message_new_method_return(message)))
|
||||
goto oom;
|
||||
|
||||
if (!dbus_connection_send(connection, reply, NULL))
|
||||
if (!bus_maybe_send_reply(connection, message, reply))
|
||||
goto oom;
|
||||
|
||||
dbus_message_unref(reply);
|
||||
|
Loading…
Reference in New Issue
Block a user