apparmor.d/apparmor.d/profiles-a-f/agetty
2024-02-07 00:16:21 +01:00

43 lines
910 B
Text

# apparmor.d - Full set of apparmor profiles
# 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} = @{bin}/agetty
profile agetty @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
include <abstractions/wutmp>
capability fsetid,
capability sys_admin,
capability sys_tty_config,
capability chown,
network netlink raw,
@{exec_path} mr,
@{bin}/login rPx,
@{etc_rw}/issue r,
/{,usr/}lib/os-release r,
/{etc,run,lib,usr/lib}/issue r,
/{etc,run,lib,usr/lib}/issue.d/{,*} r,
/etc/inittab r,
/etc/login.defs r,
/etc/login.defs.d/ r,
/etc/os-release r,
/usr/etc/login.defs r,
owner @{run}/agetty.reload rw,
/dev/tty@{int} rw,
owner /dev/ttyGS@{int} rw,
owner /dev/ttyS@{int} rw,
include if exists <local/agetty>
}