feat(profile): general update.

This commit is contained in:
Alexandre Pujol 2024-03-05 16:58:16 +00:00
parent faa40c8cde
commit c66d3bf9f4
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
32 changed files with 149 additions and 115 deletions

View file

@ -7,7 +7,7 @@ abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/cockpit/cockpit-certificate-ensure
profile cockpit-certificate-ensure @{exec_path} {
profile cockpit-certificate-ensure @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
capability dac_override,

View file

@ -7,7 +7,7 @@ abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/cockpit/cockpit-tls
profile cockpit-tls @{exec_path} {
profile cockpit-tls @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
network inet stream,

View file

@ -0,0 +1,39 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /usr/share/cockpit/motd/update-motd
profile cockpit-update-motd @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
@{exec_path} mr,
@{sh_path} rix,
@{bin}/hostname rix,
@{bin}/ip rPx,
@{bin}/sed rix,
@{bin}/systemctl rCx -> systemctl,
@{run}/cockpit/active.motd rw,
owner /dev/tty rw,
profile systemctl {
include <abstractions/base>
include <abstractions/systemctl>
capability net_admin,
capability sys_ptrace,
@{PROC}/sys/kernel/cap_last_cap r,
include if exists <local/cockpit-update-motd_systemctl>
}
include if exists <local/cockpit-update-motd>
}