From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Steven Allen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71969: [PATCH] Support interactive D-Bus authentication Date: Tue, 09 Jul 2024 11:09:11 +0200 Message-ID: <87zfqr3pag.fsf@stebalien.com> References: <877cdzklbd.fsf@stebalien.com> <87o77a20s6.fsf@gmx.de> <87frsm1sht.fsf@gmx.de> <86v81i36vh.fsf@gnu.org> <877cdy1r2a.fsf@gmx.de> <874j91ifkj.fsf@stebalien.com> <87msmtz264.fsf@gmx.de> <87sewk2q4t.fsf@stebalien.com> <87le2coym4.fsf@gmx.de> <87sewk9fz9.fsf@stebalien.com> <871q43xar1.fsf@gmx.de> Reply-To: Steven Allen Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30189"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 71969@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 09 11:11:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sR6sO-0007cW-QO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Jul 2024 11:11:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sR6rI-0001uA-Gx; Tue, 09 Jul 2024 05:10:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sR6rF-0001tl-AC for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 05:09:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sR6rE-0008Q6-Kw for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 05:09:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sR6rJ-0007FB-Nj for bug-gnu-emacs@gnu.org; Tue, 09 Jul 2024 05:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Steven Allen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Jul 2024 09:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71969 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71969-submit@debbugs.gnu.org id=B71969.172051618227814 (code B ref 71969); Tue, 09 Jul 2024 09:10:01 +0000 Original-Received: (at 71969) by debbugs.gnu.org; 9 Jul 2024 09:09:42 +0000 Original-Received: from localhost ([127.0.0.1]:52150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sR6qz-0007EY-QA for submit@debbugs.gnu.org; Tue, 09 Jul 2024 05:09:42 -0400 Original-Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]:56675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sR6qk-0007E6-3T for 71969@debbugs.gnu.org; Tue, 09 Jul 2024 05:09:40 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id E62A51142294; Tue, 9 Jul 2024 05:09:14 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 09 Jul 2024 05:09:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stebalien.com; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1720516154; x= 1720602554; bh=xGEvUhjp7gj5mgxxZvvYu4J5DMwu8c833QsTa0xHRMI=; b=f SmcOB/nlKkSHnLiw+vkrjbYgEZn92WvN79lg3z+q928Glf/NGnjMo9CMVH3lRmlp WyOXJmYNkpE+a4w9tAOT9Q5ERkP2Icd263vyH3Q8BcIn73Gje8A0uVf2Ra4Fp8rV ApTTHsfLvD7SlzPWz2VaPlOQbLDH8QzLifTdwULdYR6v8TFTkgI/5COVIO+WU7j9 A1+E+IcX1KS9wU/jXewnEaPQay4J17gylbdlN/shsfk8iIEPabRW7UAKrPRerLjj GyFnWjFMT/mz91i1yZiS/w4xhGN+yldVgN5u8TNzsWm1s4zCYeHHHFCiul28YD58 Beyab7v2SVwwSOH5ok7Aw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1720516154; x=1720602554; bh=xGEvUhjp7gj5mgxxZvvYu4J5DMwu 8c833QsTa0xHRMI=; b=vZj8KsSyalueSjqADJ7ljaGSumxlhSDIlgTsC3msFIlq 9YVgiRSDoIcN5Mfq5+Bn9i2ucqdzQIwcjsTBRmewkhdJ+gHQwKkLCRlW1Ps4wDkw YvOIT7Gk1t8+S50ObeySQDcpey22prC0qgtebzXWBx24dfIs2zO8fCCWrwqPYi6q Ws9sbESxpoVx6wEr1bM6fvMii8AzpTab12R30jY6V86Gz4XJujSOdEVKLDWYQcmd 0a8kxzpC6otZqntnD1MgFpjMnllEVmqnldHWvkyBP1xDUea/TPvK1AHojWW2BmrR aRWxgqbsT77YxORBTa6IOE6BmBlXU8Zo2z7G286eHQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdelgdduvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepufhtvghvvghn ucetlhhlvghnuceoshhtvghvvghnsehsthgvsggrlhhivghnrdgtohhmqeenucggtffrrg htthgvrhhnpeejgfeuueeutdeikeffueevffejueffgeektefhhedvfffhgedtvdegieeh geejveenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshhtvghvvghnsehsthgvsggrlhhivghn rdgtohhm X-ME-Proxy: Feedback-ID: ie8a146a7:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Jul 2024 05:09:13 -0400 (EDT) In-Reply-To: <871q43xar1.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288629 Archived-At: Michael Albinus writes: > Steven Allen 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