Add more systemd profiles.

This commit is contained in:
Alexandre Pujol 2021-04-15 22:52:14 +01:00
parent 370dda124d
commit 2e5c8f2f72
Failed to generate hash of commit
4 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/systemd/user-environment-generators/*
profile systemd-environment-d-generator @{exec_path} {
include <abstractions/base>
include <abstractions/systemd-common>
include <abstractions/nameservice-strict>
@{exec_path} mr,
/etc/environment r,
owner @{user_config_dirs}/environment.d/{,*.conf} r,
include if exists <local/systemd-environment-d-generator>
}

View file

@ -0,0 +1,24 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/systemd/systemd-random-seed
profile systemd-random-seed @{exec_path} {
include <abstractions/base>
include <abstractions/systemd-common>
capability net_admin,
@{exec_path} mr,
/var/lib/systemd/ r,
/var/lib/systemd/random-seed rw,
@{PROC}/sys/kernel/random/poolsize r,
include if exists <local/systemd-random-seed>
}

View file

@ -0,0 +1,17 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/systemd/systemd-remount-fs
profile systemd-remount-fs @{exec_path} {
include <abstractions/base>
include <abstractions/systemd-common>
@{exec_path} mr,
include if exists <local/systemd-remount-fs>
}

View file

@ -0,0 +1,25 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/systemd/user-generators/systemd-xdg-autostart-generator
profile systemd-xdg-autostart-generator @{exec_path} {
include <abstractions/base>
include <abstractions/systemd-common>
include <abstractions/nameservice-strict>
@{exec_path} mr,
/etc/xdg/autostart/{,*.desktop} r,
owner @{user_config_dirs}/autostart/{,*.desktop} r,
owner @{run}/user/@{pid}/systemd/generator.late/{,**} rw,
owner @{PROC}/@{pid}/cgroup r,
include if exists <local/systemd-xdg-autostart-generator>
}