mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-14 20:38:30 +01:00
It’s not feasible to test that the require-same-user flag can cause authentication to fail, as that would require the build environment to have two users available. We can, however, test that it passes when authenticating a client and server running under the same user account. I have manually tested that the new flag works, by running the following as user A: ``` `$prefix/gdbus-daemon --print-env &` gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames ``` And then running the `gdbus call` command again as user B (with the same value for `DBUS_SESSION_BUS_ADDRESS` in the environment), which produces: ``` Error connecting: Unexpected lack of content trying to read a line ``` (an authentication rejection) Commenting out the use of `G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER` from `gdbusdaemon.c`, the `gdbus call` command succeeds for both users. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
17 KiB
17 KiB