feat(profile): update pkexec.

This commit is contained in:
Alexandre Pujol 2024-10-16 19:22:52 +01:00
parent 682c98b320
commit 6e2d817805
Failed to generate hash of commit
3 changed files with 7 additions and 9 deletions

View file

@ -1,6 +1,7 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
# LOGPROF-SUGGEST: no
# Minimal set of rules for pkexec.
@ -18,6 +19,7 @@
capability net_admin,
capability setgid,
capability setuid,
capability sys_ptrace,
capability sys_resource,
network netlink raw, # PAM
@ -26,8 +28,6 @@
@{bin}/pkexec mr,
@{etc_ro}/environment r,
@{etc_ro}/security/limits.d/{,*} r,
/etc/shells r,
owner @{PROC}/@{pid}/loginuid r,

View file

@ -72,8 +72,6 @@ profile update-notifier @{exec_path} {
include <abstractions/base>
include <abstractions/app/pkexec>
capability sys_ptrace,
ptrace read peer=update-notifier,
@{lib}/update-notifier/package-system-locked Px,

View file

@ -8,15 +8,15 @@ abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{bin}/pkexec
profile pkexec @{exec_path} flags=(complain) {
profile pkexec @{exec_path} {
include <abstractions/base>
include <abstractions/app/pkexec>
audit capability sys_nice,
capability sys_nice,
signal (send) set=(term, kill) peer=polkit-agent-helper,
signal send set=(term, kill) peer=polkit-agent-helper,
ptrace (read),
ptrace read,
@{exec_path} mr,
@ -28,7 +28,7 @@ profile pkexec @{exec_path} flags=(complain) {
/etc/default/locale r,
@{PROC}/@{pid}/fdinfo/@{int} r,
@{PROC}/@{pids}/stat r,
@{PROC}/@{pid}/stat r,
owner @{PROC}/@{pid}/fd/ r,
include if exists <local/pkexec>