feat(profiles): ensure apparmor_parser works with snap.

This commit is contained in:
Alexandre Pujol 2023-11-22 20:55:47 +00:00
parent e247a3949e
commit 17d187e93b
Failed to generate hash of commit

View file

@ -1,12 +1,14 @@
# apparmor.d - Full set of apparmor profiles # apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io> # Copyright (C) 2021-2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>, abi <abi/3.0>,
include <tunables/global> include <tunables/global>
@{exec_path} = @{bin}/apparmor_parser @{lib_dirs} = @{lib}/ /snap/snapd/@{int}@{lib}
@{exec_path} = @{bin}/apparmor_parser @{lib_dirs}/snapd/apparmor_parser
profile apparmor_parser @{exec_path} flags=(attach_disconnected) { profile apparmor_parser @{exec_path} flags=(attach_disconnected) {
include <abstractions/base> include <abstractions/base>
include <abstractions/consoles> include <abstractions/consoles>
@ -15,6 +17,8 @@ profile apparmor_parser @{exec_path} flags=(attach_disconnected) {
@{exec_path} mr, @{exec_path} mr,
@{lib_dirs}/snapd/apparmor.d/{,**} r,
/etc/apparmor/{,**} r, /etc/apparmor/{,**} r,
/etc/apparmor.d/{,**} r, /etc/apparmor.d/{,**} r,
/etc/apparmor.d/cache.d/{,**} rw, /etc/apparmor.d/cache.d/{,**} rw,