feat(profile): rewrite the needrestart profiles.
This commit is contained in:
parent
b9f610ed0e
commit
f22fded09c
7 changed files with 115 additions and 20 deletions
32
apparmor.d/profiles-m-r/needrestart-notify
Normal file
32
apparmor.d/profiles-m-r/needrestart-notify
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /etc/needrestart/notify.d/*
|
||||
profile needrestart-notify @{exec_path} {
|
||||
include <abstractions/base>
|
||||
|
||||
capability dac_read_search,
|
||||
capability sys_ptrace,
|
||||
|
||||
ptrace read peer=unconfined,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
@{sh_path} r,
|
||||
@{bin}/gettext.sh r,
|
||||
@{bin}/sed ix,
|
||||
|
||||
/etc/needrestart/notify.conf r,
|
||||
|
||||
@{PROC}/@{pid}/environ r,
|
||||
@{PROC}/filesystems r,
|
||||
|
||||
include if exists <local/needrestart-notify>
|
||||
}
|
||||
|
||||
# vim:syntax=apparmor
|
||||
Loading…
Add table
Add a link
Reference in a new issue