feat(profile) add the display-manager group.
- Group all display manager profile in the same group - Ensure unsuported display manager can start a DE without breaking.
This commit is contained in:
parent
7603ac33d0
commit
839f137de2
5 changed files with 70 additions and 16 deletions
162
apparmor.d/groups/display-manager/x11-xsession
Normal file
162
apparmor.d/groups/display-manager/x11-xsession
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2017-2021 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /etc/X11/Xsession
|
||||
profile x11-xsession @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/X-strict>
|
||||
|
||||
@{exec_path} r,
|
||||
|
||||
@{sh_path} rix,
|
||||
@{bin}/{,e}grep rix,
|
||||
@{bin}/{m,g,}awk rix,
|
||||
@{bin}/basename rix,
|
||||
@{bin}/cat rix,
|
||||
@{bin}/chmod rix,
|
||||
@{bin}/cut rix,
|
||||
@{bin}/date rix,
|
||||
@{bin}/fold rix,
|
||||
@{bin}/head rix,
|
||||
@{bin}/id rix,
|
||||
@{bin}/mktemp rix,
|
||||
@{bin}/readlink rix,
|
||||
@{bin}/rm rix,
|
||||
@{bin}/sed rix,
|
||||
@{bin}/sleep rix,
|
||||
@{bin}/tail rix,
|
||||
@{bin}/tempfile rix,
|
||||
@{bin}/touch rix,
|
||||
@{bin}/which{,.debianutils} rix,
|
||||
|
||||
@{bin}/dbus-update-activation-environment rCx -> dbus,
|
||||
|
||||
@{bin}/gpgconf rCx -> gpg,
|
||||
@{bin}/run-parts rCx -> run-parts,
|
||||
@{bin}/udevadm rCx -> udevadm,
|
||||
|
||||
@{bin}/flatpak rPx,
|
||||
@{bin}/glxinfo rPx,
|
||||
@{bin}/numlockx rPx,
|
||||
@{bin}/systemd-detect-virt rPx,
|
||||
@{bin}/xhost rPx,
|
||||
@{bin}/xrdb rPx,
|
||||
@{bin}/xset rPx,
|
||||
|
||||
# Allowed GUI sessions to start
|
||||
@{bin}/openbox-session rPx,
|
||||
@{bin}/enlightenment_start rPUx,
|
||||
@{bin}/sway rPUx,
|
||||
@{bin}/ssh-agent rCx -> ssh-agent,
|
||||
|
||||
@{bin}/sudo rPx, #aa:only whonix
|
||||
@{lib}/*/*.sh r,
|
||||
|
||||
/etc/default/{,*} r,
|
||||
/etc/profile.d/*.sh r,
|
||||
/etc/X11/{,**} r,
|
||||
|
||||
owner @{HOME}/.xsession-errors w,
|
||||
|
||||
owner /tmp/file* rw,
|
||||
owner /tmp/tmp.@{rand10} rw,
|
||||
owner /tmp/user/@{uid}/tmp.@{rand10} rw,
|
||||
|
||||
profile ssh-agent {
|
||||
include <abstractions/base>
|
||||
|
||||
@{bin}/ssh-agent mr,
|
||||
|
||||
@{sh_path} rix,
|
||||
|
||||
@{bin}/gpg-agent rPx,
|
||||
@{bin}/enlightenment_start rPUx,
|
||||
@{bin}/env rix,
|
||||
@{bin}/im-launch rPx,
|
||||
@{bin}/kwalletaskpass rPUx,
|
||||
@{bin}/openbox-session rPx,
|
||||
@{bin}/startkde rPUx,
|
||||
@{bin}/startxfce4 rPUx,
|
||||
@{bin}/sway rPUx,
|
||||
|
||||
owner @{HOME}/.xsession-errors w,
|
||||
|
||||
owner /tmp/ssh-*/ rw,
|
||||
owner /tmp/ssh-*/agent.* rw,
|
||||
|
||||
include if exists <local/x11-xsession_ssh-agent>
|
||||
}
|
||||
|
||||
profile run-parts {
|
||||
include <abstractions/base>
|
||||
|
||||
@{bin}/run-parts mr,
|
||||
|
||||
/etc/X11/Xsession.d/{,*} r,
|
||||
/etc/X11/Xresources/{,*} r,
|
||||
|
||||
/etc/default/kexec.d/ r,
|
||||
|
||||
owner @{HOME}/.xsession-errors w,
|
||||
|
||||
include if exists <local/x11-xsession_run-parts>
|
||||
}
|
||||
|
||||
profile dbus {
|
||||
include <abstractions/base>
|
||||
|
||||
@{bin}/dbus-update-activation-environment mr,
|
||||
|
||||
/var/lib/dbus/machine-id r,
|
||||
|
||||
owner @{HOME}/.xsession-errors rw,
|
||||
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
|
||||
include if exists <local/x11-xsession_dbus>
|
||||
}
|
||||
|
||||
profile gpg {
|
||||
include <abstractions/base>
|
||||
|
||||
@{bin}/gpgconf mr,
|
||||
|
||||
@{bin}/gpg-agent rix,
|
||||
|
||||
owner @{HOME}/.xsession-errors w,
|
||||
|
||||
owner @{HOME}/@{XDG_GPG_DIR}/ rw,
|
||||
owner @{HOME}/@{XDG_GPG_DIR}/** rwkl -> @{HOME}/@{XDG_GPG_DIR}/**,
|
||||
|
||||
@{PROC}/@{pid}/fd/ r,
|
||||
|
||||
include if exists <local/x11-xsession_gpg>
|
||||
}
|
||||
|
||||
profile udevadm {
|
||||
include <abstractions/base>
|
||||
include <abstractions/common/systemd>
|
||||
|
||||
@{bin}/udevadm mr,
|
||||
|
||||
/etc/udev/udev.conf r,
|
||||
|
||||
@{sys}/bus/ r,
|
||||
@{sys}/bus/*/devices/ r,
|
||||
@{sys}/class/ r,
|
||||
@{sys}/class/*/ r,
|
||||
@{sys}/devices/**/uevent r,
|
||||
@{run}/udev/data/* r,
|
||||
|
||||
include if exists <local/x11-xsession_udevadm>
|
||||
}
|
||||
|
||||
include if exists <local/x11-xsession>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue