fix: temporary allows xdg-mime to open any resources.

This profile needs to be rewritten and integrated with the xdg-open profiles.

fix: #378
This commit is contained in:
Alexandre Pujol 2024-07-04 21:59:07 +01:00
parent dcf92e8e88
commit 8b8a81200a
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC

View File

@ -3,6 +3,8 @@
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
# TODO: This profile needs to be rewritten and integrated with the xdg-open profiles.
abi <abi/3.0>, abi <abi/3.0>,
include <tunables/global> include <tunables/global>
@ -36,8 +38,10 @@ profile xdg-mime @{exec_path} flags=(attach_disconnected) {
@{bin}/mimetype rPx, @{bin}/mimetype rPx,
@{bin}/xprop rPx, @{bin}/xprop rPx,
/usr/share/file/misc/** r,
/usr/share/terminfo/** r, /usr/share/terminfo/** r,
owner @{HOME}/** r,
owner @{HOME}/.Xauthority r, owner @{HOME}/.Xauthority r,
owner @{user_config_dirs}/mimeapps.list{,.new} rw, 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/dri/card@{int} rw,
/dev/tty 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 # When xdg-mime is run as root, it wants to exec dbus-launch, and hence it creates the two
# following root processes: # following root processes:
# dbus-launch --autolaunch e0a30ad97cd6421c85247839ccef9db2 --binary-syntax --close-stderr # dbus-launch --autolaunch e0a30ad97cd6421c85247839ccef9db2 --binary-syntax --close-stderr