apparmor.d/profiles/startx
2021-04-01 16:17:47 +01:00

46 lines
1 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/startx
profile startx @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
include <abstractions/deny-root-dir-access>
@{exec_path} r,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/hostname rix,
/{usr/,}bin/mcookie rix,
/{usr/,}bin/mktemp rix,
/{usr/,}bin/tty rix,
/{usr/,}bin/expr rix,
/{usr/,}bin/{,e}grep rix,
/{usr/,}bin/sed rix,
/{usr/,}bin/rm rix,
/{usr/,}bin/deallocvt rix,
/{usr/,}bin/xauth rPx,
/{usr/,}bin/xinit rPx,
/etc/X11/xinit/xinitrc r,
/etc/X11/xinit/xserverrc r,
owner @{HOME}/ r,
owner @{HOME}/.xinitrc r,
owner @{HOME}/.xserverrc r,
/tmp/ r,
owner /tmp/serverauth.* rw,
/dev/ r,
owner /dev/tty[0-9]* rw,
include if exists <local/startx>
}