mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
GDBus: Add new call flag to allow interactive authorization
DBus has recently introduced new message flag DBUS_HEADER_FLAG_ALLOW_INTERACTIVE_AUTHORIZATION, which tells that caller is willing to wait for unspecified amount of time for the call to return, as the service may perform interactive authorization (e.g. using polkit). https://bugzilla.gnome.org/show_bug.cgi?id=739616
This commit is contained in:
committed by
Matthias Clasen
parent
865ce79ce0
commit
b31a873fb3
@@ -5265,8 +5265,14 @@ static void
|
||||
add_call_flags (GDBusMessage *message,
|
||||
GDBusCallFlags flags)
|
||||
{
|
||||
GDBusMessageFlags msg_flags = 0;
|
||||
|
||||
if (flags & G_DBUS_CALL_FLAGS_NO_AUTO_START)
|
||||
g_dbus_message_set_flags (message, G_DBUS_MESSAGE_FLAGS_NO_AUTO_START);
|
||||
msg_flags |= G_DBUS_MESSAGE_FLAGS_NO_AUTO_START;
|
||||
if (flags & G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION)
|
||||
msg_flags |= G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION;
|
||||
if (msg_flags)
|
||||
g_dbus_message_set_flags (message, msg_flags);
|
||||
}
|
||||
|
||||
static GVariant *
|
||||
|
Reference in New Issue
Block a user