apparmor.d/profiles/redshift
2021-04-01 16:02:59 +01:00

47 lines
1.2 KiB
Text

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
# Copyright (C) 2015 Cameron Norman <camerontnorman@gmail.com>
# Copyright (C) 2017-2021 Mikhail Morfikov
#
# 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.
#
# ------------------------------------------------------------------
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>
}