feat(abs): add the tpm abstraction.
This commit is contained in:
parent
618b1116f8
commit
c239203e72
3 changed files with 18 additions and 5 deletions
16
apparmor.d/abstractions/tpm
Normal file
16
apparmor.d/abstractions/tpm
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2016-2017 Canonical Ltd
|
||||
# Copyright (C) 2021-2025 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# Communication to the system TPM chip over /dev/tpm@{int} and kernel TPM
|
||||
# resource manager /dev/tpmrm@{int}
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
/dev/tpm@{int} rw,
|
||||
/dev/tpmrm@{int} rw,
|
||||
|
||||
include if exists <abstractions/tpm.d>
|
||||
|
||||
# vim:syntax=apparmor
|
||||
|
|
@ -20,6 +20,7 @@ profile fwupd @{exec_path} flags=(attach_disconnected,complain) {
|
|||
include <abstractions/mime>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/sqlite>
|
||||
include <abstractions/tpm>
|
||||
|
||||
capability dac_override,
|
||||
capability dac_read_search,
|
||||
|
|
@ -133,8 +134,6 @@ profile fwupd @{exec_path} flags=(attach_disconnected,complain) {
|
|||
/dev/mei@{int} rw,
|
||||
/dev/mem r,
|
||||
/dev/mtd@{int} rw,
|
||||
/dev/tpm@{int} rw,
|
||||
/dev/tpmrm@{int} rw,
|
||||
/dev/wmi/* r,
|
||||
|
||||
profile gpg flags=(attach_disconnected,complain) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ include <tunables/global>
|
|||
@{exec_path} = @{bin}/sbctl
|
||||
profile sbctl @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/tpm>
|
||||
|
||||
capability dac_read_search,
|
||||
capability linux_immutable,
|
||||
|
|
@ -34,9 +35,6 @@ profile sbctl @{exec_path} {
|
|||
@{sys}/firmware/efi/efivars/SecureBoot-@{uuid} r,
|
||||
@{sys}/firmware/efi/efivars/SetupMode-@{uuid} r,
|
||||
|
||||
/dev/pts/@{int} rw,
|
||||
/dev/tpmrm@{int} rw,
|
||||
|
||||
# File Inherit
|
||||
deny network inet stream,
|
||||
deny network inet6 stream,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue