Add arch-audit & pacdiff.

This commit is contained in:
Alexandre Pujol 2021-04-04 17:28:12 +01:00
parent 5353729d73
commit d570ff123e
Failed to generate hash of commit
2 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# 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/arch-audit
profile arch-audit @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/ssl_certs>
network inet dgram,
network inet6 dgram,
network inet stream,
network inet6 stream,
network netlink raw,
@{exec_path} mr,
/etc/arch-audit/settings.toml r,
/usr/share/terminfo/x/xterm-256color r,
/var/lib/pacman/local/{,**} r,
@{PROC}/@{pid}/cgroup r,
@{PROC}/@{pid}/mountinfo r,
@{sys}/cgroup/cpu,cpuacct/user.slice/cpu.cfs_quota_us r,
@{sys}/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us r,
include if exists <local/arch-audit>
}

View file

@ -0,0 +1,38 @@
# 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/pacdiff
profile pacdiff @{exec_path} {
include <abstractions/base>
capability dac_read_search,
capability mknod,
@{exec_path} mr,
/{usr/,}bin/pacman-conf rPx,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/cat rix,
/{usr/,}bin/gawk rix,
/{usr/,}bin/tput rix,
/{usr/,}bin/locate rix,
/{usr/,}bin/find rix,
# packages files
/ r,
/boot/{,**} r,
/etc/{,**} r,
/opt/{,**} r,
/srv/{,**} r,
/usr/{,**} r,
/var/{,**} r,
/dev/tty rw,
include if exists <local/pacdiff>
}