mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 07:54:17 +01:00
feat(profile): update flatpak profiles stack.
This commit is contained in:
parent
65d0cfafe4
commit
a63201486b
@ -12,9 +12,10 @@
|
||||
# some applications, flatpak needs write access to the sandbox content. This is
|
||||
# done through bwrap and therefore in this profile.
|
||||
#
|
||||
# 1. All of this will have to be improved. However, as of today, it is the only way
|
||||
# to not break some (major) flatpak app.
|
||||
# 2. It is not a big deal as flatpak is responsible for the sandbox anyway. This this only defence in depth.
|
||||
# 1. All of this will have to be improved. However, as of today, it is the only
|
||||
# way to not break some (major) flatpak app.
|
||||
# 2. It is not a big deal as flatpak is responsible for the sandbox anyway.
|
||||
# This this only defence in depth.
|
||||
# 3. The main purpose of this profile is to ensure all processes are confined.
|
||||
|
||||
abi <abi/3.0>,
|
||||
@ -29,8 +30,7 @@ profile flatpak-app flags=(attach_disconnected,mediate_deleted) {
|
||||
|
||||
capability dac_override,
|
||||
capability dac_read_search,
|
||||
# When bwrap is setup with setuid privileges, it needs the setuid capability.
|
||||
capability setuid,
|
||||
capability setuid, # Needed when bwrap is setup with setuid privileges.
|
||||
capability sys_resource,
|
||||
|
||||
network inet dgram,
|
||||
@ -69,6 +69,7 @@ profile flatpak-app flags=(attach_disconnected,mediate_deleted) {
|
||||
|
||||
/app/.ref k,
|
||||
/app/extra/** rw,
|
||||
/app/lib/** rk,
|
||||
/bindfile@{rand6} rw,
|
||||
|
||||
/var/lib/flatpak/app/{,**} r,
|
||||
|
@ -20,7 +20,10 @@ profile flatpak-session-helper @{exec_path} flags=(attach_disconnected) {
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{bin}/dbus-monitor rPUx,
|
||||
@{bin}/flatpak rPx,
|
||||
@{bin}/ps rPx,
|
||||
@{bin}/p11-kit rix,
|
||||
@{bin}/pkexec rPx,
|
||||
@{lib}/p11-kit/p11-kit-remote rix,
|
||||
|
@ -50,7 +50,7 @@ profile flatpak-system-helper @{exec_path} {
|
||||
@{PROC}/@{pid}/stat r,
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
owner @{PROC}/@{pid}/fdinfo/@{int} r,
|
||||
|
||||
|
||||
profile gpg {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
@ -68,6 +68,7 @@ profile flatpak-system-helper @{exec_path} {
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
owner @{PROC}/@{pid}/task/@{tid}/comm rw,
|
||||
|
||||
include if exists <local/flatpak-system-helper_gpg>
|
||||
}
|
||||
|
||||
include if exists <local/flatpak-system-helper>
|
||||
|
16
apparmor.d/profiles-a-f/flatpak-validate-icon
Normal file
16
apparmor.d/profiles-a-f/flatpak-validate-icon
Normal file
@ -0,0 +1,16 @@
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = @{lib}/flatpak-validate-icon
|
||||
profile flatpak-validate-icon @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
include if exists <local/flatpak-validate-icon>
|
||||
}
|
Loading…
Reference in New Issue
Block a user