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

40 lines
987 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2015 Cameron Norman <camerontnorman@gmail.com>
# Copyright (C) 2017-2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/redshift
profile redshift @{exec_path} {
include <abstractions/base>
include <abstractions/wayland>
include <abstractions/nameservice-strict>
include <abstractions/deny-root-dir-access>
@{exec_path} mr,
dbus send
bus=system
path=/org/freedesktop/GeoClue2/Client/[0-9]*[0-9],
dbus receive
bus=system
path=/org/freedesktop/GeoClue2/Manager,
# Allow but log any other dbus activity
audit dbus bus=system,
# Redshift config files
owner @{HOME}/.config/redshift/{,**} rw,
owner @{HOME}/.config/redshift.conf rw,
owner @{run}/user/[0-9]*/redshift-shared-* rw,
owner @{HOME}/.Xauthority r,
owner /tmp/xauth-[0-9]*-_[0-9] r,
include if exists <local/redshift>
}