mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
Add unattended-upgrade profiles.
This commit is contained in:
parent
c6ab1770d0
commit
162670237c
2 changed files with 55 additions and 0 deletions
29
apparmor.d/groups/apt/unattended-upgrade
Normal file
29
apparmor.d/groups/apt/unattended-upgrade
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# apparmor.d - Full set of apparmor profiles
|
||||||
|
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
abi <abi/3.0>,
|
||||||
|
|
||||||
|
include <tunables/global>
|
||||||
|
|
||||||
|
@{exec_path} = /{usr/,}bin/unattended-upgrade
|
||||||
|
profile unattended-upgrade @{exec_path} {
|
||||||
|
include <abstractions/base>
|
||||||
|
include <abstractions/python>
|
||||||
|
|
||||||
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
/{usr/,}bin/python3.[0-9]* rix,
|
||||||
|
/{usr/,}bin/uname rix,
|
||||||
|
/{usr/,}bin/dpkg rPx,
|
||||||
|
/{usr/,}bin/lsb_release rPx -> lsb_release,
|
||||||
|
|
||||||
|
/var/log/unattended-upgrades/*.log rw,
|
||||||
|
|
||||||
|
owner @{run}/unattended-upgrades.pid rw,
|
||||||
|
owner @{run}/unattended-upgrades.lock rwk,
|
||||||
|
|
||||||
|
owner @{PROC}/@{pids}/fd/ r,
|
||||||
|
|
||||||
|
include if exists <local/unattended-upgrade>
|
||||||
|
}
|
26
apparmor.d/groups/apt/unattended-upgrade-shutdown
Normal file
26
apparmor.d/groups/apt/unattended-upgrade-shutdown
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# apparmor.d - Full set of apparmor profiles
|
||||||
|
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
abi <abi/3.0>,
|
||||||
|
|
||||||
|
include <tunables/global>
|
||||||
|
|
||||||
|
@{exec_path} = /usr/share/unattended-upgrades/unattended-upgrade-shutdown
|
||||||
|
profile unattended-upgrade-shutdown @{exec_path} flags=(attach_disconnected) {
|
||||||
|
include <abstractions/base>
|
||||||
|
include <abstractions/nameservice-strict>
|
||||||
|
include <abstractions/python>
|
||||||
|
|
||||||
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
/usr/share/unattended-upgrades/{,*} r,
|
||||||
|
/etc/apt/apt.conf.d/{,*} r,
|
||||||
|
|
||||||
|
owner /var/log/unattended-upgrades/*.log rw,
|
||||||
|
|
||||||
|
owner @{run}/unattended-upgrades.lock rwk,
|
||||||
|
owner @{run}/systemd/inhibit/[0-9]*.ref rw,
|
||||||
|
|
||||||
|
include if exists <local/unattended-upgrade-shutdown>
|
||||||
|
}
|
Loading…
Reference in a new issue