From: Diederik de Haas <didi.debian at cknow.org>
To: iwd at lists.01.org
Subject: D-Bus policies
Date: Fri, 14 Jan 2022 18:15:57 +0100 [thread overview]
Message-ID: <3141398.bvkd0EhLq2@bagend> (raw)
[-- Attachment #1: Type: text/plain, Size: 2694 bytes --]
Hi,
Based on a Debian bug report I started a research into iwd's D-Bus policy and
found 2 items. I'll start with the 2nd as that's easier/shorter to describe.
This is purely informational as I'm not knowledgeable enough about iwd or
D-Bus or how iwd intends to use DBus for certain functionality.
1) In src/iwd-dbus.conf I saw there was a policy for the wheel group, but not
for the netdev group. The wheel group is normally not used on Debian systems,
but the netdev group is. According to https://wiki.debian.org/SystemGroups:
"netdev: Members of this group can manage network interfaces through
the network manager and wicd."
I have found (only) one distro which actually patches iwd to add netdev:
https://git.alpinelinux.org/aports/tree/community/iwd/dbus-netdev-group.patch
The rest that _I_ have found just use what's provided by iwd.
2) The bug that started my research is https://bugs.debian.org/998427, saying:
"dbus-broker-launch[2169]: Deprecated policy context in
/usr/share/dbus-1/system.d/iwd-dbus.conf +21. The 'at_console' context
is deprecated and will be ignored in the future."
It is also a warning in Debian's Lintian tool:
https://lintian.debian.org/tags/dbus-policy-at-console which links to
https://bugs.freedesktop.org/39611 which is moved/continued at
https://gitlab.freedesktop.org/dbus/dbus/-/issues/52
The OP of that bug from 2011 states that the 'at_console' property should
be removed and that PolicyKit should be used instead.
Looking into possible solutions, I found 2 very similar commits, but in
different projects, bluez and system-config-printer:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=3ef0ce954b66fdf45538a6cdc629f3dac6642832
https://github.com/OpenPrinting/system-config-printer/commit/19df47d2630b637d1802efe2c3cd5a00f2e40c3b
They both link to https://www.spinics.net/lists/linux-bluetooth/msg75267.html
While I lack the knowledge to fully understand what it says I did notice this:
"The intent is clear: As long as you are logged in to a local machine, and you
are the foreground/active console, you are allowed to control bluetooth.
However, the behavior of 'at_console' does *not* match this intent."
In other places I saw the 'at_console' stanza just plainly removed without
any replacement, but it could have undesirable consequences for iwd.
The arch wiki does contain a section to restrict the 'at_console' policy:
https://wiki.archlinux.org/title/Iwd#Deny_console_(local)_user_from_modifying_the_settings
It appears that they make the, likely incorrect, assumption about console
users, but they do restrict its permissions to mostly ReadOnly.
HTH,
Diederik
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next reply other threads:[~2022-01-14 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 17:15 Diederik de Haas [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-01-21 23:13 D-Bus policies Denis Kenzior
2022-01-25 14:49 Diederik de Haas
2022-01-25 15:38 Denis Kenzior
2022-01-25 21:48 Diederik de Haas
2022-01-25 22:15 Denis Kenzior
2022-01-25 22:43 Diederik de Haas
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=3141398.bvkd0EhLq2@bagend \
--to=unknown@example.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.
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.