Update profiles.

This commit is contained in:
Alexandre Pujol 2021-08-22 15:32:42 +01:00
parent f922a5f8e8
commit b2d3af8bca
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
26 changed files with 57 additions and 37 deletions

View file

@ -80,6 +80,7 @@ profile gnome-control-center @{exec_path} flags=(attach_disconnected) {
@{run}/udev/data/+pci* r,
@{run}/udev/data/c13:[0-9]* r, # for /dev/input/*
@{run}/udev/data/c235:[0-9]* r,
@{run}/udev/data/c236:[0-9]* r,
@{run}/udev/data/n[0-9]* r,
@{sys}/bus/ r,

View file

@ -1,5 +1,6 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2017-2021 Mikhail Morfikov
# 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
@ -27,6 +28,9 @@ profile gpg @{exec_path} {
owner @{HOME}/@{XDG_GPG_DIR}/ rw,
owner @{HOME}/@{XDG_GPG_DIR}/** rwkl -> @{HOME}/@{XDG_GPG_DIR}/**,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/gnupg/ rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/gnupg/** rwkl -> @{HOME}/@{XDG_PROJECTS_DIR}/**/gnupg/**,
owner /var/lib/*/gnupg/ rw,
owner /var/lib/*/gnupg/** rwkl -> /var/lib/*/gnupg/**,

View file

@ -27,6 +27,18 @@ profile gpg-agent @{exec_path} {
owner @{HOME}/@{XDG_GPG_DIR}/private-keys-v1.d/[0-9A-F]*.key rw,
owner @{HOME}/@{XDG_GPG_DIR}/S.gpg-agent{,.ssh,.browser,.extra} rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/{.,}gnupg/ rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/{.,}gnupg/gpg-agent.conf r,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/{.,}gnupg/private-keys-v1.d/ rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/{.,}gnupg/private-keys-v1.d/[0-9A-F]*.key rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/{.,}gnupg/S.gpg-agent{,.ssh,.browser,.extra} rw,
owner @{user_tmp_dirs}/**/{.,}gnupg/ rw,
owner @{user_tmp_dirs}/**/{.,}gnupg/gpg-agent.conf r,
owner @{user_tmp_dirs}/**/{.,}gnupg/private-keys-v1.d/ rw,
owner @{user_tmp_dirs}/**/{.,}gnupg/private-keys-v1.d/[0-9A-F]*.key rw,
owner @{user_tmp_dirs}/**/{.,}gnupg/S.gpg-agent{,.ssh,.browser,.extra} rw,
owner /var/lib/*/.gnupg/ rw,
owner /var/lib/*/.gnupg/private-keys-v1.d/ rw,
owner /var/lib/*/.gnupg/private-keys-v1.d/[0-9A-F]*.key rw,

View file

@ -51,7 +51,7 @@ profile bootctl @{exec_path} {
owner @{PROC}/@{pid}/cgroup r,
@{PROC}/sys/kernel/random/poolsize r,
# Silencer
# Inherit silencer
deny network inet6 stream,
deny network inet stream,

View file

@ -20,9 +20,5 @@ profile systemd-detect-virt @{exec_path} flags=(attach_disconnected) {
@{sys}/devices/virtual/dmi/id/board_vendor r,
@{sys}/devices/virtual/dmi/id/bios_vendor r,
# Silencer
deny network inet6 stream,
deny network inet stream,
include if exists <local/systemd-detect-virt>
}

View file

@ -14,9 +14,14 @@ profile systemd-environment-d-generator @{exec_path} {
@{exec_path} mr,
/{usr/,}bin/gpgconf rPx,
/{usr/,}bin/mawk rix,
/etc/environment r,
owner @{user_config_dirs}/environment.d/{,*.conf} r,
/dev/tty rw,
include if exists <local/systemd-environment-d-generator>
}

View file

@ -19,9 +19,5 @@ profile systemd-hwdb @{exec_path} {
owner @{PROC}/@{pid}/stat r,
# Silencer
deny network inet6 stream,
deny network inet stream,
include if exists <local/systemd-hwdb>
}

View file

@ -27,9 +27,5 @@ profile systemd-sysctl @{exec_path} {
/etc/sysctl.conf r,
# Silencer
deny network inet6 stream,
deny network inet stream,
include if exists <local/systemd-sysctl>
}

View file

@ -37,9 +37,5 @@ profile systemd-sysusers @{exec_path} {
owner @{PROC}/@{pid}/stat r,
@{PROC}/sys/kernel/random/boot_id r,
# Silencer
deny network inet6 stream,
deny network inet stream,
include if exists <local/systemd-sysusers>
}

View file

@ -13,6 +13,7 @@ profile systemd-tmpfiles @{exec_path} {
include <abstractions/nameservice-strict>
capability chown,
capability dac_override,
capability dac_read_search,
capability fowner,
capability fsetid,
@ -49,9 +50,5 @@ profile systemd-tmpfiles @{exec_path} {
@{PROC}/@{pid}/net/unix r,
# Silencer
deny network inet6 stream,
deny network inet stream,
include if exists <local/systemd-tmpfiles>
}

View file

@ -97,9 +97,5 @@ profile systemd-udevd @{exec_path} flags=(attach_disconnected complain) {
# file_inherit
owner @{HOME}/.xsession-errors w,
# Silencer
deny network inet6 stream,
deny network inet stream,
include if exists <local/systemd-udevd>
}

View file

@ -12,6 +12,8 @@ profile systemd-xdg-autostart-generator @{exec_path} {
include <abstractions/systemd-common>
include <abstractions/nameservice-strict>
capability net_admin,
@{exec_path} mr,
/etc/xdg/autostart/{,*.desktop} r,