mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-19 09:28:17 +01:00
82 lines
2.2 KiB
Text
82 lines
2.2 KiB
Text
# vim:syntax=apparmor
|
|
# ------------------------------------------------------------------
|
|
#
|
|
# Copyright (C) 2019-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/xdg-settings
|
|
profile xdg-settings @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
|
|
@{exec_path} r,
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
/{usr/,}bin/{,e}grep rix,
|
|
/{usr/,}bin/cut rix,
|
|
/{usr/,}bin/mv rix,
|
|
/{usr/,}bin/wc rix,
|
|
/{usr/,}bin/mktemp rix,
|
|
/{usr/,}bin/cat rix,
|
|
/{usr/,}bin/sed rix,
|
|
/{usr/,}bin/sort rix,
|
|
/{usr/,}bin/which rix,
|
|
/{usr/,}bin/readlink rix,
|
|
/{usr/,}bin/basename rix,
|
|
/{usr/,}bin/uname rix,
|
|
|
|
# When xdg-settings is run as root, it wants to exec dbus-launch, and hence it creates the two
|
|
# following root processes:
|
|
# dbus-launch --autolaunch e0a30ad97cd6421c85247839ccef9db2 --binary-syntax --close-stderr
|
|
# /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
|
|
#
|
|
# Should this be allowed? Xdg-settings works fine without this.
|
|
#/{usr/,}bin/dbus-launch rCx -> dbus,
|
|
#/{usr/,}bin/dbus-send rCx -> dbus,
|
|
deny /{usr/,}bin/dbus-launch rx,
|
|
deny /{usr/,}bin/dbus-send rx,
|
|
|
|
/{usr/,}bin/xprop rPx,
|
|
/{usr/,}bin/xdg-mime rPx,
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
/etc/xdg/xfce4/helpers.rc r,
|
|
owner @{HOME}/.config/xfce4/helpers.rc{,.*} rw,
|
|
|
|
owner @{HOME}/.Xauthority r,
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
/etc/machine-id r,
|
|
|
|
# For shell pwd
|
|
owner @{HOME}/ r,
|
|
|
|
@{run}/user/[0-9]*/ r,
|
|
|
|
|
|
profile dbus {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
/{usr/,}bin/dbus-launch mr,
|
|
/{usr/,}bin/dbus-send mr,
|
|
/{usr/,}bin/dbus-daemon rPUx,
|
|
|
|
# for dbus-launch
|
|
owner @{HOME}/.dbus/session-bus/[0-9a-f]*-[0-9] w,
|
|
|
|
@{HOME}/.Xauthority r,
|
|
}
|
|
|
|
include if exists <local/xdg-settings>
|
|
}
|