From 8b8a81200a56734730de3b4426b1587a47d1e3c9 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Thu, 4 Jul 2024 21:59:07 +0100 Subject: [PATCH] fix: temporary allows xdg-mime to open any resources. This profile needs to be rewritten and integrated with the xdg-open profiles. fix: #378 --- apparmor.d/groups/freedesktop/xdg-mime | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apparmor.d/groups/freedesktop/xdg-mime b/apparmor.d/groups/freedesktop/xdg-mime index badefb81..c279c41a 100644 --- a/apparmor.d/groups/freedesktop/xdg-mime +++ b/apparmor.d/groups/freedesktop/xdg-mime @@ -3,6 +3,8 @@ # Copyright (C) 2022-2024 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only +# TODO: This profile needs to be rewritten and integrated with the xdg-open profiles. + abi , include @@ -36,8 +38,10 @@ profile xdg-mime @{exec_path} flags=(attach_disconnected) { @{bin}/mimetype rPx, @{bin}/xprop rPx, + /usr/share/file/misc/** r, /usr/share/terminfo/** r, + owner @{HOME}/** r, owner @{HOME}/.Xauthority r, owner @{user_config_dirs}/mimeapps.list{,.new} rw, @@ -49,6 +53,8 @@ profile xdg-mime @{exec_path} flags=(attach_disconnected) { /dev/dri/card@{int} rw, /dev/tty rw, + @{PROC}/version r, + # When xdg-mime is run as root, it wants to exec dbus-launch, and hence it creates the two # following root processes: # dbus-launch --autolaunch e0a30ad97cd6421c85247839ccef9db2 --binary-syntax --close-stderr