all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Steven Allen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Eli Zaretskii <eliz@gnu.org>, 71969@debbugs.gnu.org
Subject: bug#71969: [PATCH] Support interactive D-Bus authentication
Date: Tue, 09 Jul 2024 11:09:11 +0200	[thread overview]
Message-ID: <87zfqr3pag.fsf@stebalien.com> (raw)
In-Reply-To: <871q43xar1.fsf@gmx.de>


Michael Albinus <michael.albinus@gmx.de> writes:
> Steven Allen <steven@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





  reply	other threads:[~2024-07-09  9:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-06  7:53 bug#71969: [PATCH] Support interactive D-Bus authentication Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06 11:54 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06 14:53   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06 14:57     ` Eli Zaretskii
2024-07-06 15:24       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-07 11:53         ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-07 14:50           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08  9:24             ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 12:29               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 12:50                 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 13:21                 ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09  7:52                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09  9:09                     ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-09 12:10                       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 15:45                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 19:28                     ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 19:34                       ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09 19:54                         ` Steven Allen via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfqr3pag.fsf@stebalien.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=71969@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=steven@stebalien.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.