79 lines
1.8 KiB
Bash
79 lines
1.8 KiB
Bash
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/4.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{bin}/login
|
|
profile login @{exec_path} flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
include <abstractions/authentication>
|
|
include <abstractions/bus-system>
|
|
include <abstractions/consoles>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/wutmp>
|
|
|
|
capability audit_write,
|
|
capability chown,
|
|
capability dac_override,
|
|
capability dac_read_search,
|
|
capability fowner,
|
|
capability fsetid,
|
|
capability kill,
|
|
capability net_admin,
|
|
capability setgid,
|
|
capability setuid,
|
|
capability sys_resource,
|
|
capability sys_tty_config,
|
|
|
|
network netlink raw,
|
|
|
|
signal (send) set=(hup term),
|
|
|
|
unix type=stream addr=@@{udbus}/bus/login/system,
|
|
|
|
ptrace read,
|
|
|
|
#aa:dbus talk bus=system name=org.freedesktop.login1 label=systemd-logind
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{bin}/@{shells} rUx,
|
|
|
|
@{etc_ro}/environment r,
|
|
@{etc_ro}/security/limits.d/{,*} r,
|
|
/etc/default/locale r,
|
|
/etc/legal r,
|
|
/etc/machine-id r,
|
|
/etc/motd r,
|
|
/etc/motd.d/ r,
|
|
/etc/security/group.conf r,
|
|
/etc/security/limits.conf r,
|
|
/etc/security/pam_env.conf r,
|
|
/etc/shells r,
|
|
|
|
/var/lib/faillock/@{user} rwk,
|
|
/var/log/btmp{,.@{int}} r,
|
|
|
|
owner @{user_cache_dirs}/motd.legal-displayed rw,
|
|
|
|
@{run}/credentials/getty@tty@{int}.service/ r,
|
|
@{run}/dbus/system_bus_socket rw,
|
|
@{run}/faillock/@{user} rwk,
|
|
@{run}/motd.d/{,*} r,
|
|
@{run}/motd.dynamic{,.new} rw,
|
|
@{run}/systemd/sessions/*.ref rw,
|
|
|
|
@{PROC}/@{pids}/cgroup r,
|
|
@{PROC}/1/limits r,
|
|
owner @{PROC}/@{pid}/loginuid rw,
|
|
owner @{PROC}/@{pid}/uid_map r,
|
|
|
|
/dev/tty@{int} rw,
|
|
|
|
include if exists <local/login>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|