public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* Do not start mpris-proxy for root user
@ 2025-01-26 15:04 Antonio Russo
  2025-05-17 13:12 ` Salvatore Bonaccorso
  0 siblings, 1 reply; 14+ messages in thread
From: Antonio Russo @ 2025-01-26 15:04 UTC (permalink / raw)
  To: linux-bluetooth


[-- Attachment #1.1.1: Type: text/plain, Size: 1314 bytes --]

Hello,

A default installation of bluez results in the systemd user unit
mpris-proxy.service being started for all users---including root.
This unnecessarily exposes root to any security vulnerability in
mpris-proxy.

Please consider the following trivial patch that changes this
default behavior.

Best,
Antonio Russo


 From d9e02494e661109607c073968fa352c1397a1ffb Mon Sep 17 00:00:00 2001
From: Antonio Enrico Russo <aerusso@aerusso.net>
Date: Sun, 26 Jan 2025 08:00:26 -0700
Subject: [PATCH] Do not start mpris-proxy for root user

A default installation of bluez results in the systemd user unit
mpris-proxy.service being started for all users---including root.
This unnecessarily exposes root to any security vulnerability in
mpris-proxy.

Inhibit this default behavior by using ConditionUser=!root.

Signed-off-by: Antonio Enrico Russo <aerusso@aerusso.net>
---
  tools/mpris-proxy.service.in | 1 +
  1 file changed, 1 insertion(+)

diff --git a/tools/mpris-proxy.service.in b/tools/mpris-proxy.service.in
index 5307490..118ed6e 100644
--- a/tools/mpris-proxy.service.in
+++ b/tools/mpris-proxy.service.in
@@ -4,6 +4,7 @@ Documentation=man:mpris-proxy(1)
  
  Wants=dbus.socket
  After=dbus.socket
+ConditionUser=!root
  
  [Service]
  Type=simple
-- 
2.48.1


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7801 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-06-03 17:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-26 15:04 Do not start mpris-proxy for root user Antonio Russo
2025-05-17 13:12 ` Salvatore Bonaccorso
2025-05-17 14:06   ` Guido Günther
2025-05-18 13:12   ` Andrew Sayers
2025-05-31  8:20     ` Salvatore Bonaccorso
2025-05-31 18:17       ` Guido Günther
2025-06-02  0:29         ` Antonio Russo
2025-06-02 18:18           ` Luiz Augusto von Dentz
2025-06-03  3:37             ` [PATCH] Do not start mpris-proxy for system users Antonio Russo
2025-06-03  5:10               ` bluez.test.bot
2025-06-03  6:59               ` [PATCH] " Guido Günther
2025-06-03  7:16               ` Paul Menzel
2025-06-03 14:35               ` Andrew Sayers
2025-06-03 17:30               ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox