Enable flameshot profile

I tested in enforce mode the flameshot profile and
fix a little problem with access resources for this app.

All work OK in Debian Stable.
This commit is contained in:
Jose Maldonado aka Yukiteru 2024-05-09 23:55:05 -04:00 committed by Alex
parent 2b6fb63245
commit 31cb3e962d
2 changed files with 4 additions and 1 deletions

View file

@ -1,54 +0,0 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/flameshot
profile flameshot @{exec_path} {
include <abstractions/base>
include <abstractions/desktop>
include <abstractions/fontconfig-cache-read>
include <abstractions/graphics>
include <abstractions/nameservice-strict>
include <abstractions/qt5-compose-cache-write>
include <abstractions/qt5-settings-write>
include <abstractions/ssl_certs>
include <abstractions/thumbnails-cache-read>
include <abstractions/user-download-strict>
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
network netlink dgram,
@{exec_path} mr,
@{bin}/whoami rix,
@{open_path} rPx -> child-open-help,
/var/lib/dbus/machine-id r,
/etc/machine-id r,
owner @{user_config_dirs}/flameshot/ rw,
owner @{user_config_dirs}/flameshot/** rwlk -> @{user_config_dirs}/flameshot/**,
owner @{tmp}/.*/{,s} rw,
owner @{tmp}/*= rw,
owner @{tmp}/qipc_{systemsem,sharedmemory}_*@{hex} rw,
owner /dev/shm/#@{int} rw,
@{PROC}/sys/kernel/random/boot_id r,
owner @{PROC}/@{pid}/cmdline r,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/mountinfo r,
owner @{PROC}/@{pid}/mounts r,
include if exists <local/flameshot>
}