2021-04-01 17:17:47 +02:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
|
|
|
# Copyright (C) 2020-2021 Mikhail Morfikov
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2020-09-12 17:19:23 +02:00
|
|
|
|
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/openbox
|
|
|
|
profile openbox @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/fonts>
|
|
|
|
include <abstractions/fontconfig-cache-read>
|
|
|
|
include <abstractions/freedesktop.org>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/deny-root-dir-access>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
signal (send) set=(term, kill),
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
/{usr/,}lib/@{multiarch}/openbox-autostart rCx -> autostart,
|
|
|
|
|
|
|
|
# Apps allowed to run
|
|
|
|
/{usr/,}sbin/* rPUx,
|
|
|
|
/{usr/,}bin/* rPUx,
|
|
|
|
/usr/libexec/* rPUx,
|
|
|
|
|
|
|
|
/usr/share/themes/*/openbox-3/themerc r,
|
|
|
|
|
|
|
|
/etc/xdg/openbox/* r,
|
|
|
|
|
|
|
|
owner @{HOME}/ r,
|
2020-12-24 13:55:12 +01:00
|
|
|
owner @{HOME}/.config/openbox/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner @{HOME}/.config/openbox/* r,
|
|
|
|
|
|
|
|
owner @{HOME}/.config/obmenu-generator/icons/[0-9a-f]*.png r,
|
|
|
|
|
|
|
|
owner @{HOME}/.cache/ rw,
|
|
|
|
owner @{HOME}/.cache/openbox/ rw,
|
|
|
|
owner @{HOME}/.cache/openbox/openbox.log rw,
|
2021-03-21 17:04:10 +01:00
|
|
|
owner @{HOME}/.cache/openbox/sessions/ rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
owner @{HOME}/.Xauthority r,
|
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
owner /dev/tty[0-9]* rw,
|
|
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
|
|
|
|
|
|
|
|
profile autostart {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}lib/@{multiarch}/openbox-autostart mr,
|
|
|
|
/{usr/,}lib/@{multiarch}/openbox-xdg-autostart rix,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
|
|
/{usr/,}bin/which rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# Apps allowed to run
|
|
|
|
/{usr/,}bin/* rPUx,
|
|
|
|
/usr/libexec/* rPUx,
|
2021-01-10 16:35:07 +01:00
|
|
|
/{usr/,}lib/@{multiarch}/*/** rPUx,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/usr/local/lib/python*/dist-packages/ r,
|
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
owner @{HOME}/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner @{HOME}/.config/openbox/autostart r,
|
|
|
|
owner @{HOME}/.config/autostart/{,*} r,
|
2020-12-09 10:30:52 +01:00
|
|
|
/etc/xdg/openbox/autostart r,
|
2020-09-12 17:19:23 +02:00
|
|
|
/etc/xdg/autostart/{,*} r,
|
|
|
|
|
2021-01-10 16:35:07 +01:00
|
|
|
# Silencer
|
|
|
|
/{usr/,}lib/python3/** w,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
# file_inherit
|
|
|
|
owner @{HOME}/.xsession-errors w,
|
2020-09-12 17:46:51 +02:00
|
|
|
owner /dev/tty[0-9]* rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/openbox_autostart>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/openbox>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|