2020-12-18 11:12:55 +01:00
|
|
|
|
# vim:syntax=apparmor
|
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
2020-12-18 11:12:55 +01:00
|
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
|
#
|
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
abi <abi/3.0>,
|
|
|
|
|
|
|
|
|
|
include <tunables/global>
|
|
|
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}lib/apt/apt.systemd.daily
|
2021-03-14 18:57:00 +01:00
|
|
|
|
profile apt-systemd-daily @{exec_path} {
|
2020-12-18 11:12:55 +01:00
|
|
|
|
include <abstractions/base>
|
|
|
|
|
|
2020-12-24 13:55:12 +01:00
|
|
|
|
# Needed to remove the following error:
|
|
|
|
|
# apt.systemd.daily[]: find: ‘/var/cache/apt/archives/partial’: Permission denied
|
|
|
|
|
capability dac_read_search,
|
|
|
|
|
|
2020-12-18 11:12:55 +01:00
|
|
|
|
@{exec_path} mrix,
|
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
|
|
|
|
|
|
|
|
/{usr/,}bin/flock rix,
|
|
|
|
|
/{usr/,}bin/cmp rix,
|
|
|
|
|
/{usr/,}bin/cp rix,
|
|
|
|
|
/{usr/,}bin/rm rix,
|
|
|
|
|
/{usr/,}bin/mv rix,
|
|
|
|
|
/{usr/,}bin/savelog rix,
|
|
|
|
|
/{usr/,}bin/which rix,
|
|
|
|
|
/{usr/,}bin/touch rix,
|
|
|
|
|
/{usr/,}bin/basename rix,
|
2020-12-24 13:55:12 +01:00
|
|
|
|
/{usr/,}bin/dirname rix,
|
2020-12-18 11:12:55 +01:00
|
|
|
|
/{usr/,}bin/date rix,
|
|
|
|
|
/{usr/,}bin/find rix,
|
|
|
|
|
/{usr/,}bin/du rix,
|
|
|
|
|
/{usr/,}bin/stat rix,
|
|
|
|
|
/{usr/,}bin/sort rix,
|
|
|
|
|
/{usr/,}bin/uniq rix,
|
|
|
|
|
/{usr/,}bin/wc rix,
|
|
|
|
|
/{usr/,}bin/seq rix,
|
2020-12-24 13:55:12 +01:00
|
|
|
|
/{usr/,}bin/xargs rix,
|
|
|
|
|
/{usr/,}bin/gzip rix,
|
2020-12-18 11:12:55 +01:00
|
|
|
|
|
|
|
|
|
/{usr/,}bin/apt-config rPx,
|
|
|
|
|
/{usr/,}bin/apt-get rPx,
|
|
|
|
|
|
|
|
|
|
/etc/default/locale r,
|
|
|
|
|
|
|
|
|
|
# The /daily_lock file is only used when the /var/lib/apt/daily_lock can be accessed.
|
|
|
|
|
#/daily_lock w,
|
|
|
|
|
/var/lib/apt/daily_lock wk,
|
|
|
|
|
|
|
|
|
|
/var/lib/apt/extended_states r,
|
2021-02-13 15:00:16 +01:00
|
|
|
|
/var/lib/apt/periodic/autoclean-stamp w,
|
2020-12-18 11:12:55 +01:00
|
|
|
|
|
2020-12-24 13:55:12 +01:00
|
|
|
|
/var/backups/ r,
|
|
|
|
|
/var/backups/apt.extended_states rw,
|
|
|
|
|
/var/backups/apt.extended_states.[0-9]* rw,
|
|
|
|
|
/var/backups/apt.extended_states.[0-9]*.gz w,
|
2020-12-18 11:12:55 +01:00
|
|
|
|
|
|
|
|
|
/var/cache/apt/ r,
|
|
|
|
|
/var/cache/apt/archives/ r,
|
2020-12-24 13:55:12 +01:00
|
|
|
|
/var/cache/apt/archives/partial/ r,
|
|
|
|
|
/var/cache/apt/archives/*.deb rw,
|
2020-12-18 11:12:55 +01:00
|
|
|
|
/var/cache/apt/backup/ r,
|
|
|
|
|
|
2020-12-24 13:55:12 +01:00
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
|
|
2020-12-18 11:12:55 +01:00
|
|
|
|
include if exists <local/apt-systemd-daily>
|
|
|
|
|
}
|