feat(profile): add gdm init profiles.

This commit is contained in:
Alexandre Pujol 2023-11-27 19:25:34 +00:00
parent b8c2380da4
commit 4c689dbad9
Failed to generate hash of commit
3 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,43 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /usr/share/gdm/generate-config
profile gdm-generate-config @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
capability dac_read_search,
capability setgid,
capability setuid,
@{exec_path} mr,
@{bin}/{,ba,da}sh rix,
@{bin}/dconf rix,
@{bin}/install rix,
@{bin}/pgrep rix,
@{bin}/pkill rix,
@{bin}/setpriv rix,
@{bin}/setsid rix,
/etc/gdm{3,}/* r,
/usr/share/gdm/{,**} r,
/var/lib/ r,
/var/lib/gdm{3,}/{,**} r,
@{PROC}/ r,
@{PROC}/@{pid}/cgroup r,
@{PROC}/@{pid}/cmdline r,
@{PROC}/@{pid}/stat r,
@{PROC}/uptime r,
@{sys}/devices/system/node/ r,
@{sys}/devices/system/node/node@{int}/meminfo r,
include if exists <local/gdm-generate-config>
}

View file

@ -0,0 +1,32 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/gnome-initial-setup
profile gnome-initial-setup @{exec_path} {
include <abstractions/base>
include <abstractions/dbus-session-strict>
include <abstractions/dconf-write>
include <abstractions/gnome>
include <abstractions/mesa>
network netlink raw,
dbus bind bus=session name=org.gnome.InitialSetup,
@{exec_path} mr,
@{bin}/df rPx,
@{bin}/dpkg rPx -> child-dpkg,
@{bin}/lscpu rPx,
@{bin}/lspci rPx,
@{bin}/xrandr rPx,
@{lib}/gnome-initial-setup-goa-helper rix,
include if exists <local/gnome-initial-setup>
}

View file

@ -113,6 +113,7 @@ fsck-ext4 complain
fuse-overlayfs complain fuse-overlayfs complain
fusermount complain fusermount complain
gdisk complain gdisk complain
gdm-generate-config complain
gdm-runtime-config complain gdm-runtime-config complain
gdm-x-session attach_disconnected,complain gdm-x-session attach_disconnected,complain
gdm-xsession complain gdm-xsession complain