mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-18 08:58:15 +01:00
feat(profiles): general update.
This commit is contained in:
parent
7b4979cc63
commit
1fb2de0acd
10 changed files with 20 additions and 13 deletions
|
@ -36,6 +36,6 @@
|
||||||
# For fonts downloaded via font-manager (###FIXME### when they fix resolving of vars)
|
# For fonts downloaded via font-manager (###FIXME### when they fix resolving of vars)
|
||||||
owner @{user_share_dirs}/fonts/ rw,
|
owner @{user_share_dirs}/fonts/ rw,
|
||||||
owner @{user_share_dirs}/fonts/**/.uuid{,.NEW,.LCK,.TMP-*} rw,
|
owner @{user_share_dirs}/fonts/**/.uuid{,.NEW,.LCK,.TMP-*} rw,
|
||||||
link @{user_share_dirs}/fonts/**/.uuid.LCK -> /home/*/.local/share/fonts/**/.uuid.TMP-*,
|
link @{user_share_dirs}/fonts/**/.uuid.LCK -> @{user_share_dirs}/fonts/**/.uuid.TMP-*,
|
||||||
|
|
||||||
include if exists <abstractions/fontconfig-cache-write.d>
|
include if exists <abstractions/fontconfig-cache-write.d>
|
||||||
|
|
|
@ -44,6 +44,7 @@ profile apt-methods-store @{exec_path} {
|
||||||
/root/ r,
|
/root/ r,
|
||||||
|
|
||||||
/var/lib/apt/lists/{,**} r,
|
/var/lib/apt/lists/{,**} r,
|
||||||
|
/var/lib/ubuntu-advantage/apt-esm/{,**} r,
|
||||||
owner /var/lib/apt/lists/* rw,
|
owner /var/lib/apt/lists/* rw,
|
||||||
owner /var/lib/apt/lists/partial/* rw,
|
owner /var/lib/apt/lists/partial/* rw,
|
||||||
owner /var/lib/ubuntu-advantage/apt-esm/{,**} rw,
|
owner /var/lib/ubuntu-advantage/apt-esm/{,**} rw,
|
||||||
|
|
|
@ -35,6 +35,7 @@ profile dpkg-preconfigure @{exec_path} {
|
||||||
owner /tmp/*.template.* rw,
|
owner /tmp/*.template.* rw,
|
||||||
owner /tmp/*.config.* rwPUx,
|
owner /tmp/*.config.* rwPUx,
|
||||||
|
|
||||||
|
owner /var/cache/debconf/ rw,
|
||||||
owner /var/cache/debconf/{config,passwords,templates}.dat{,-old,-new} rwk,
|
owner /var/cache/debconf/{config,passwords,templates}.dat{,-old,-new} rwk,
|
||||||
owner /var/log/unattended-upgrades/unattended-upgrades-dpkg.log rw,
|
owner /var/log/unattended-upgrades/unattended-upgrades-dpkg.log rw,
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,8 @@ profile dbus-daemon @{exec_path} flags=(attach_disconnected) {
|
||||||
/usr/share/gnome-documents/org.gnome.Documents rPx,
|
/usr/share/gnome-documents/org.gnome.Documents rPx,
|
||||||
/usr/share/org.gnome.Characters/org.gnome.Characters rPx,
|
/usr/share/org.gnome.Characters/org.gnome.Characters rPx,
|
||||||
/usr/share/org.gnome.Characters/org.gnome.Characters.BackgroundService rPx,
|
/usr/share/org.gnome.Characters/org.gnome.Characters.BackgroundService rPx,
|
||||||
|
@{user_share_dirs}/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js rPx,
|
||||||
|
/usr/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js rPx,
|
||||||
|
|
||||||
/etc/dbus-1/{,**} r,
|
/etc/dbus-1/{,**} r,
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ profile systemd-tmpfiles @{exec_path} flags=(attach_disconnected) {
|
||||||
capability fsetid,
|
capability fsetid,
|
||||||
capability mknod,
|
capability mknod,
|
||||||
capability net_admin,
|
capability net_admin,
|
||||||
|
capability sys_resource,
|
||||||
capability syslog,
|
capability syslog,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
|
@ -43,8 +43,8 @@ profile update-motd-updates-available @{exec_path} {
|
||||||
|
|
||||||
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log rw,
|
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log rw,
|
||||||
|
|
||||||
/var/cache/apt/ r,
|
owner /var/cache/apt/ rw,
|
||||||
/var/cache/apt/** rwk,
|
owner /var/cache/apt/** rwk,
|
||||||
|
|
||||||
/tmp/ r,
|
/tmp/ r,
|
||||||
|
|
||||||
|
|
|
@ -49,10 +49,12 @@ profile needrestart @{exec_path} flags=(attach_disconnected) {
|
||||||
/etc/needrestart/*.d/* rix,
|
/etc/needrestart/*.d/* rix,
|
||||||
/etc/shadow r,
|
/etc/shadow r,
|
||||||
|
|
||||||
|
/ r,
|
||||||
/boot/ r,
|
/boot/ r,
|
||||||
/boot/intel-ucode.img r,
|
/boot/intel-ucode.img r,
|
||||||
/boot/vmlinuz* r,
|
/boot/vmlinuz* r,
|
||||||
|
|
||||||
|
owner /var/lib/juju/agents/{,**} r,
|
||||||
owner /var/cache/debconf/{config,passwords,templates}.dat{,-new,-old} rwk,
|
owner /var/cache/debconf/{config,passwords,templates}.dat{,-new,-old} rwk,
|
||||||
|
|
||||||
@{PROC}/ r,
|
@{PROC}/ r,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# apparmor.d - Full set of apparmor profiles
|
# apparmor.d - Full set of apparmor profiles
|
||||||
# Copyright (C) 2020-2021 Mikhail Morfikov
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
||||||
|
# Copyright (C) 2021-2023 Alexandre Pujol <alexandre@pujol.io>
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
abi <abi/3.0>,
|
abi <abi/3.0>,
|
||||||
|
@ -9,26 +10,19 @@ include <tunables/global>
|
||||||
@{exec_path} = @{bin}/newgrp
|
@{exec_path} = @{bin}/newgrp
|
||||||
profile newgrp @{exec_path} {
|
profile newgrp @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
include <abstractions/consoles>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
|
|
||||||
# To write records to the kernel auditing log.
|
|
||||||
capability audit_write,
|
capability audit_write,
|
||||||
|
|
||||||
# To remove the following errors:
|
|
||||||
# setgroups: Operation not permitted
|
|
||||||
# setgid: Operation not permitted
|
|
||||||
capability setgid,
|
capability setgid,
|
||||||
|
|
||||||
# newgrp is a SETUID binary
|
|
||||||
capability setuid,
|
capability setuid,
|
||||||
|
|
||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
# Shells to use
|
@{bin}/{,b,d,rb}ash rUx,
|
||||||
@{bin}/{,b,d,rb}ash rPUx,
|
@{bin}/{c,k,tc,z}sh rUx,
|
||||||
@{bin}/{c,k,tc,z}sh rPUx,
|
|
||||||
|
|
||||||
/etc/{passwd,group,shadow,gshadow} r,
|
/etc/{passwd,group,shadow,gshadow} r,
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ profile protonmail-bridge @{exec_path} {
|
||||||
@{bin}/tty rix,
|
@{bin}/tty rix,
|
||||||
@{bin}/which rix,
|
@{bin}/which rix,
|
||||||
|
|
||||||
|
owner @{user_password_store_dirs}/ r,
|
||||||
owner @{user_password_store_dirs}/.gpg-id r,
|
owner @{user_password_store_dirs}/.gpg-id r,
|
||||||
owner @{user_password_store_dirs}/protonmail-credentials/{,**} rw,
|
owner @{user_password_store_dirs}/protonmail-credentials/{,**} rw,
|
||||||
deny owner @{user_password_store_dirs}/**/ r,
|
deny owner @{user_password_store_dirs}/**/ r,
|
||||||
|
|
|
@ -21,6 +21,11 @@ profile qemu-ga @{exec_path} {
|
||||||
|
|
||||||
ptrace peer=unconfined,
|
ptrace peer=unconfined,
|
||||||
|
|
||||||
|
dbus send bus=system path=/org/freedesktop/login1
|
||||||
|
interface=org.freedesktop.login1.Manager
|
||||||
|
member={ScheduleShutdown,SetWallMessage}
|
||||||
|
peer=(name=org.freedesktop.login1, label=systemd-logind),
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
@{bin}/systemctl rix,
|
@{bin}/systemctl rix,
|
||||||
|
|
Loading…
Reference in a new issue