diff --git a/apparmor.d/groups/freedesktop/xdg-mime b/apparmor.d/groups/freedesktop/xdg-mime index badefb819..c279c41ad 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