2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
|
|
# License published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}bin/startx
|
|
|
|
profile startx @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/deny-root-dir-access>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} r,
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{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,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/xauth rPx,
|
|
|
|
/{usr/,}bin/xinit rPx,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/etc/X11/xinit/xinitrc r,
|
|
|
|
/etc/X11/xinit/xserverrc r,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
owner @{HOME}/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner @{HOME}/.xinitrc r,
|
|
|
|
owner @{HOME}/.xserverrc r,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/tmp/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner /tmp/serverauth.* rw,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/dev/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner /dev/tty[0-9]* rw,
|
2020-12-09 10:30:52 +01:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/startx>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|