feat(profile): rewrite the needrestart profiles.

This commit is contained in:
Alexandre Pujol 2025-05-25 01:00:08 +02:00
parent b9f610ed0e
commit f22fded09c
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
7 changed files with 115 additions and 20 deletions

View 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