General profiles update.
This commit is contained in:
parent
559020861b
commit
0c494ed2ba
31 changed files with 61 additions and 36 deletions
|
|
@ -9,12 +9,15 @@
|
||||||
# Allow to receive some signals
|
# Allow to receive some signals
|
||||||
signal (receive) peer=top,
|
signal (receive) peer=top,
|
||||||
signal (receive) peer=htop,
|
signal (receive) peer=htop,
|
||||||
|
signal (receive) set=(term,cont) peer=systemd,
|
||||||
signal (receive) set=(term,kill,stop,cont) peer=systemd-shutdown,
|
signal (receive) set=(term,kill,stop,cont) peer=systemd-shutdown,
|
||||||
signal (receive) set=(term,kill) peer=openbox,
|
signal (receive) set=(term,kill) peer=openbox,
|
||||||
signal (receive) set=(hup) peer=xinit,
|
signal (receive) set=(hup) peer=xinit,
|
||||||
signal (receive) set=(term,kill) peer=su,
|
signal (receive) set=(term,kill) peer=su,
|
||||||
signal (receive) peer=sudo,
|
signal (receive) peer=sudo,
|
||||||
|
|
||||||
|
ptrace (readby) peer=systemd-coredump,
|
||||||
|
|
||||||
# Allow to write a user defined fifo log devices
|
# Allow to write a user defined fifo log devices
|
||||||
owner /dev/log-xsession w,
|
owner /dev/log-xsession w,
|
||||||
owner /dev/log-gnupg w,
|
owner /dev/log-gnupg w,
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ profile accounts-daemon @{exec_path} {
|
||||||
capability sys_ptrace,
|
capability sys_ptrace,
|
||||||
deny capability sys_nice,
|
deny capability sys_nice,
|
||||||
|
|
||||||
|
ptrace (read) peer=unconfined,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
owner /var/lib/AccountsService/ r,
|
owner /var/lib/AccountsService/ r,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@ include <tunables/global>
|
||||||
profile glib-compile-schemas @{exec_path} {
|
profile glib-compile-schemas @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
|
network inet stream,
|
||||||
|
network inet6 stream,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
/usr/share/glib-2.0/schemas/{,*} r,
|
/usr/share/glib-2.0/schemas/{,*} r,
|
||||||
|
|
|
||||||
|
|
@ -24,11 +24,14 @@ profile gdm-session-worker @{exec_path} flags=(attach_disconnected) {
|
||||||
capability sys_nice,
|
capability sys_nice,
|
||||||
capability sys_tty_config,
|
capability sys_tty_config,
|
||||||
|
|
||||||
signal (send) set=hup peer=gsd-*,
|
signal (receive) set=term peer=gdm,
|
||||||
|
signal (send) set=hup peer=dbus-daemon,
|
||||||
|
signal (send) set=hup peer=gjs-console,
|
||||||
signal (send) set=hup peer=gnome-*,
|
signal (send) set=hup peer=gnome-*,
|
||||||
|
signal (send) set=hup peer=gsd-*,
|
||||||
|
signal (send) set=hup peer=ibus-*,
|
||||||
signal (send) set=hup peer=xwayland,
|
signal (send) set=hup peer=xwayland,
|
||||||
signal (send) set=term peer=gdm-wayland-session,
|
signal (send) set=term peer=gdm-wayland-session,
|
||||||
signal (receive) set=term peer=gdm,
|
|
||||||
|
|
||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ profile gnome-session-binary @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
|
|
||||||
signal (send) set=(term) peer=gsd-*,
|
signal (send) set=(term) peer=gsd-*,
|
||||||
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
signal (receive) set=(term) peer=gdm-wayland-session,
|
signal (receive) set=(term) peer=gdm-wayland-session,
|
||||||
signal (receive) set=(term) peer=gdm,
|
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
profile gsd-a11y-settings @{exec_path} flags=(attach_disconnected) {
|
profile gsd-a11y-settings @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ profile gsd-color @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/fonts>
|
include <abstractions/fonts>
|
||||||
include <abstractions/gtk>
|
include <abstractions/gtk>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
profile gsd-datetime @{exec_path} flags=(attach_disconnected) {
|
profile gsd-datetime @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ profile gsd-housekeeping @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/thumbnails-cache-read>
|
include <abstractions/thumbnails-cache-read>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ profile gsd-keyboard @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/fonts>
|
include <abstractions/fonts>
|
||||||
include <abstractions/gtk>
|
include <abstractions/gtk>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ profile gsd-media-keys @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/fonts>
|
include <abstractions/fonts>
|
||||||
include <abstractions/gtk>
|
include <abstractions/gtk>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ profile gsd-power @{exec_path} flags=(attach_disconnected) {
|
||||||
|
|
||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ profile gsd-print-notifications @{exec_path} flags=(attach_disconnected) {
|
||||||
network inet stream,
|
network inet stream,
|
||||||
network inet6 stream,
|
network inet6 stream,
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
signal (send) set=(hup) peer=gsd-printer,
|
signal (send) set=(hup) peer=gsd-printer,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
profile gsd-printer @{exec_path} flags=(attach_disconnected) {
|
profile gsd-printer @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
signal (receive) set=(hup) peer=gsd-print-notifications,
|
signal (receive) set=(hup) peer=gsd-print-notifications,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
profile gsd-rfkill @{exec_path} flags=(attach_disconnected) {
|
profile gsd-rfkill @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
profile gsd-screensaver-proxy @{exec_path} flags=(attach_disconnected) {
|
profile gsd-screensaver-proxy @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
profile gsd-sharing @{exec_path} flags=(attach_disconnected) {
|
profile gsd-sharing @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
profile gsd-smartcard @{exec_path} flags=(attach_disconnected) {
|
profile gsd-smartcard @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ include <tunables/global>
|
||||||
profile gsd-sound @{exec_path} flags=(attach_disconnected) {
|
profile gsd-sound @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ profile gsd-wacom @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/fonts>
|
include <abstractions/fonts>
|
||||||
include <abstractions/gtk>
|
include <abstractions/gtk>
|
||||||
|
|
||||||
signal (receive) set=term peer=gdm,
|
signal (receive) set=(term, hup) peer=gdm*,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ profile tracker-extract @{exec_path} {
|
||||||
owner @{MOUNTS}/*/{,**} r,
|
owner @{MOUNTS}/*/{,**} r,
|
||||||
owner /tmp/*/{,**} r,
|
owner /tmp/*/{,**} r,
|
||||||
|
|
||||||
|
owner @{PROC}/@{pid}/fd/ r,
|
||||||
|
|
||||||
include <abstractions/dconf>
|
include <abstractions/dconf>
|
||||||
owner @{run}/user/@{uid}/dconf/ rw,
|
owner @{run}/user/@{uid}/dconf/ rw,
|
||||||
owner @{run}/user/@{uid}/dconf/user rw,
|
owner @{run}/user/@{uid}/dconf/user rw,
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ profile pacdiff @{exec_path} {
|
||||||
capability dac_read_search,
|
capability dac_read_search,
|
||||||
capability mknod,
|
capability mknod,
|
||||||
|
|
||||||
|
network inet stream,
|
||||||
|
network inet6 stream,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
/{usr/,}bin/pacman-conf rPx,
|
/{usr/,}bin/pacman-conf rPx,
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,10 @@ include <tunables/global>
|
||||||
@{exec_path} = /{usr/,}bin/pacman-conf
|
@{exec_path} = /{usr/,}bin/pacman-conf
|
||||||
profile pacman-conf @{exec_path} flags=(attach_disconnected) {
|
profile pacman-conf @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
|
network inet stream,
|
||||||
|
network inet6 stream,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
/etc/pacman.conf r,
|
/etc/pacman.conf r,
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ profile child-systemctl {
|
||||||
include <abstractions/consoles>
|
include <abstractions/consoles>
|
||||||
include <abstractions/wutmp>
|
include <abstractions/wutmp>
|
||||||
|
|
||||||
capability sys_ptrace,
|
|
||||||
capability net_admin,
|
capability net_admin,
|
||||||
|
capability sys_ptrace,
|
||||||
|
|
||||||
ptrace (read),
|
ptrace (read),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ profile systemd-machined @{exec_path} flags=(complain) {
|
||||||
|
|
||||||
/etc/machine-id r,
|
/etc/machine-id r,
|
||||||
|
|
||||||
@{run}/systemd/machines/{,**} r,
|
@{run}/systemd/machines/{,**} rw,
|
||||||
@{run}/systemd/userdb/io.systemd.Machine rw,
|
@{run}/systemd/userdb/io.systemd.Machine rw,
|
||||||
|
|
||||||
include if exists <local/systemd-machined>
|
include if exists <local/systemd-machined>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ profile adb @{exec_path} {
|
||||||
|
|
||||||
@{exec_path} mrix,
|
@{exec_path} mrix,
|
||||||
|
|
||||||
|
/usr/share/scrcpy/scrcpy-server r,
|
||||||
|
|
||||||
owner /tmp/adb.[0-9]*.log rw,
|
owner /tmp/adb.[0-9]*.log rw,
|
||||||
|
|
||||||
owner @{HOME}/.android/ rw,
|
owner @{HOME}/.android/ rw,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
# apparmor.d - Full set of apparmor profiles
|
# apparmor.d - Full set of apparmor profiles
|
||||||
# Copyright (C) 2018-2021 Mikhail Morfikov
|
# Copyright (C) 2018-2021 Mikhail Morfikov
|
||||||
|
# 2021 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>,
|
||||||
|
|
@ -11,14 +12,13 @@ profile polkitd @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
|
|
||||||
# Tu run as polkitd:nogroup
|
|
||||||
capability setuid,
|
capability setuid,
|
||||||
capability setgid,
|
capability setgid,
|
||||||
|
|
||||||
# Needed?
|
|
||||||
capability sys_ptrace,
|
capability sys_ptrace,
|
||||||
audit deny capability net_admin,
|
audit deny capability net_admin,
|
||||||
|
|
||||||
|
ptrace (read) peer=unconfined,
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
@{PROC}/@{pids}/stat r,
|
@{PROC}/@{pids}/stat r,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
# apparmor.d - Full set of apparmor profiles
|
# apparmor.d - Full set of apparmor profiles
|
||||||
# Copyright (C) 2018-2021 Mikhail Morfikov
|
# Copyright (C) 2018-2021 Mikhail Morfikov
|
||||||
|
# 2021 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>,
|
||||||
|
|
@ -12,19 +13,12 @@ profile rtkit-daemon @{exec_path} {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/nameservice-strict>
|
include <abstractions/nameservice-strict>
|
||||||
|
|
||||||
# To raise process nice and set scheduling policies (real-time) and priorities
|
capability dac_read_search,
|
||||||
capability sys_nice,
|
|
||||||
|
|
||||||
# To chroot /proc/
|
|
||||||
capability sys_chroot,
|
|
||||||
|
|
||||||
# To run daemon as rtkit:rtkit
|
|
||||||
capability setgid,
|
capability setgid,
|
||||||
capability setuid,
|
capability setuid,
|
||||||
|
capability sys_chroot,
|
||||||
# The two are visible in systemd service, but it doesn't seem they're needed
|
capability sys_nice,
|
||||||
#capability dac_read_search,
|
capability sys_ptrace,
|
||||||
#capability sys_ptrace,
|
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
# 2021 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>,
|
||||||
|
|
@ -12,5 +13,13 @@ profile udisksctl @{exec_path} {
|
||||||
|
|
||||||
@{exec_path} mr,
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
/{usr/,}bin/{,ba,da}sh rix,
|
||||||
|
|
||||||
|
/{usr/,}bin/pager rPx -> child-pager,
|
||||||
|
/{usr/,}bin/less rPx -> child-pager,
|
||||||
|
/{usr/,}bin/more rPx -> child-pager,
|
||||||
|
|
||||||
|
/dev/tty rw,
|
||||||
|
|
||||||
include if exists <local/udisksctl>
|
include if exists <local/udisksctl>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ profile udisksd @{exec_path} flags=(attach_disconnected) {
|
||||||
# Error mounting /dev/sd* at /media/*/*: Operation not permitted.
|
# Error mounting /dev/sd* at /media/*/*: Operation not permitted.
|
||||||
capability sys_admin,
|
capability sys_admin,
|
||||||
|
|
||||||
|
capability chown,
|
||||||
capability dac_read_search,
|
capability dac_read_search,
|
||||||
capability dac_override,
|
capability dac_override,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ abi <abi/3.0>,
|
||||||
include <tunables/global>
|
include <tunables/global>
|
||||||
|
|
||||||
@{exec_path} = /{usr/,}bin/xdg-open
|
@{exec_path} = /{usr/,}bin/xdg-open
|
||||||
profile xdg-open @{exec_path} {
|
profile xdg-open @{exec_path} flags=(attach_disconnected) {
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
include <abstractions/consoles>
|
include <abstractions/consoles>
|
||||||
include <abstractions/app-launcher-user>
|
include <abstractions/app-launcher-user>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue