mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
gdbus: Add flags to require authentication as the same user
This eliminates a common use case for the `GDBusAuthObserver::authorize-authenticated-peer` signal, which is often implemented incorrectly by people. Suggested by Simon McVittie. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #1804
This commit is contained in:
@@ -70,7 +70,9 @@
|
||||
* connections from any successfully authenticated user (but not from
|
||||
* anonymous connections using the `ANONYMOUS` mechanism). If you only
|
||||
* want to allow D-Bus connections from processes owned by the same uid
|
||||
* as the server, you would use a signal handler like the following:
|
||||
* as the server, since GLib 2.68, you should use the
|
||||
* %G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flag. It’s equivalent
|
||||
* to the following signal handler:
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* static gboolean
|
||||
|
Reference in New Issue
Block a user