Skip to contentSkip to conversation

dbus: Remove 'at_console', add 'netdev' settings

PATCH Applied Diederik de Haas 2 participants 2 messages Jan 26, 2022

lore
Share & tools
lore

Diederik de Haas

author
#0 lore raw

PATCH v2 1/1 dbus: Remove 'at_console', add 'netdev' settings

The 'at_console' D-Bus policy setting has been deprecated for more then 10 years and could be ignored at any time in the future. Moreover, while the intend was to allow locally logged on users to interact with iwd, it didn't actually do that.
More info at https://www.spinics.net/lists/linux-bluetooth/msg75267.html
and https://gitlab.freedesktop.org/dbus/dbus/-/issues/52
Therefor remove the 'at_console' setting block.

On Debian (based) systems, there is a standard defined group which is allowed to manage network interfaces, and that is the 'netdev' group. So add a D-Bus setting block to grant the 'netdev' group that access.
---
Changes since v1:
- Added 'dbus' prefix to primary commit message and shortened it to less then 50 chars
- Reformatted secondary commit message to max 72 chars and fixed a small typo (_ -> ')

 src/iwd-dbus.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/iwd-dbus.conf +1 -1
index 6b07ba9e..257b0b14 100644
@@ -18,7 +18,7 @@
     <allow send_interface="net.connman.iwd.Agent"/>
   </policy>
 
-  <policy at_console="true">
+  <policy group="netdev">
     <allow send_destination="net.connman.iwd"/>
     <allow send_interface="net.connman.iwd.Agent"/>
   </policy>
Signature · 1 line
2.34.1
Applied
#1 lore raw

Hi Diederik,

Quoted 18 lines · Diederik de Haas

The 'at_console' D-Bus policy setting has been deprecated for more then 10 years and could be ignored at any time in the future. Moreover, while the intend was to allow locally logged on users to interact with iwd, it didn't actually do that.
More info at https://www.spinics.net/lists/linux-bluetooth/msg75267.html
and https://gitlab.freedesktop.org/dbus/dbus/-/issues/52
Therefor remove the 'at_console' setting block.

On Debian (based) systems, there is a standard defined group which is allowed to manage network interfaces, and that is the 'netdev' group. So add a D-Bus setting block to grant the 'netdev' group that access.
---
Changes since v1:
- Added 'dbus' prefix to primary commit message and shortened it to less then 50 chars
- Reformatted secondary commit message to max 72 chars and fixed a small typo (_ -> ')

Quoted 3 lines
  src/iwd-dbus.conf | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis