apparmor.d/apparmor.d/groups/apt/command-not-found
2025-09-14 15:34:04 +02:00

42 lines
1 KiB
Text

# 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/4.0>,
include <tunables/global>
@{exec_path} = /usr/share/command-not-found/command-not-found
@{exec_path} += @{bin}/command-not-found
@{exec_path} += @{lib}/command-not-found
profile command-not-found @{exec_path} {
include <abstractions/base>
include <abstractions/apt>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
include <abstractions/python>
capability dac_read_search,
@{exec_path} r,
@{python_path} r,
@{bin}/lsb_release rPx,
@{bin}/snap rPx,
@{lib}/ r,
@{lib}/@{python_name}/dist-packages/CommandNotFound/{,**/}__pycache__/*.cpython-@{int}.pyc.@{int}@{int} w,
/usr/share/command-not-found/{,**} r,
/var/lib/command-not-found/commands.db rwk,
owner @{PROC}/@{pid}/fd/ r,
/dev/tty@{int} rw,
include if exists <local/command-not-found>
}
# vim:syntax=apparmor