After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739616 - DBus; Add new call flag to allow interactive authorization
DBus; Add new call flag to allow interactive authorization
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
2.43.x
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-11-04 11:54 UTC by Jan Safranek
Modified: 2015-06-05 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.96 KB, patch)
2014-11-04 11:54 UTC, Jan Safranek
committed Details | Review

Description Jan Safranek 2014-11-04 11:54:13 UTC
Created attachment 289973 [details] [review]
patch

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).

See https://bugs.freedesktop.org/show_bug.cgi?id=83449 for details.

Attached patch adds new flags to appropriate places so glib applications can set it.

Tested with systemd 217, where e.g. org.freedesktop.Manager.StartUnit() call uses this flag to allow interactive polkit authorization.
Comment 1 Allison Karlitskaya (desrt) 2014-11-09 15:43:05 UTC
Review of attachment 289973 [details] [review]:

Looks good.  Please commit this.

I think this feature would be a lot more usable if we added an API to GDBusMethodInvocation:

gboolean  g_dbus_method_invocation_allows_interactive_authentication (GDBusMethodInvocation *invocation);

Would you mind adding that in a separate patch?