GNU bug report logs -
#71969
[PATCH] Support interactive D-Bus authentication
Previous Next
Reported by: Steven Allen <steven <at> stebalien.com>
Date: Sat, 6 Jul 2024 07:55:02 UTC
Severity: wishlist
Tags: patch
Fixed in version 31.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Michael Albinus <michael.albinus <at> gmx.de> writes:
> Steven Allen <steven <at> stebalien.com> writes:
>
> Hi Steven,
>
>>>> Sorry about that. To restart the bluetooth service, execute:
>>>>
>>>> (dbus-call-method
>>>> :system
>>>> "org.freedesktop.systemd1" "/org/freedesktop/systemd1"
>>>> "org.freedesktop.systemd1.Manager" "RestartUnit"
>>>> :authorize t
>>>> "bluetooth.service" "replace")
>>>>
>>>> Assuming you have a polkit agent running (most DEs will run one by
>>>> default, but agents like mate-polkit work pretty well standalone),
>>>> you'll be prompted to authorize the operation and the bluetooth service
>>>> will be restarted.
>>>
>>> Nice. I get an authorization prompt.
>>>
>>> However, on my Fedora 40 / Gnome 46 / systemd 255 system, it doesn't
>>> matter, whether I use ':authorize t', ':authorize nil', or none of
>>> them. Is interactive authorization enabled by default, and we don't need
>>> to care about?
>>
>> It worked for me as well until a recent update (likely polkit 124 or
>> systemd 256). I'm guessing one of these projects fixed a bug somewhere
>> as it sounds like this flag should always have been required.
>
> Hmm, I don't understand what you want to say.
>
> Anyway, I believe we shall add this feature to Emacs only when we have
> seen an example where it makes a difference.
>
> Best regards, Michael.
I meant that `dbus-method-call` worked without `:authorize t` for me as
well until I updated my system. Testing both systemd and fwupd, it
appears that the issue was caused by upgrading to systemd 256 (available
on Arch Linux but not Fedora 40). That is, systemd 256 requires
`:authorize t` while fwupd does not.
From what I can tell, this change was introduced in this [1] systemd PR.
Specifically, this comment:
This also fixes a bunch of wrong uses of the "interactive" bool. The
bool makes no sense today as the ALLOW_INTERACTIVE_AUTHORIZATION
field in the D-Bus message header replaces it fully.
[1]: https://github.com/systemd/systemd/pull/30565
This bug report was last modified 1 year and 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.