update
This commit is contained in:
parent
a333a77cb5
commit
355d958e26
5 changed files with 206 additions and 156 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2019-2021 Mikhail Morfikov
|
||||
# Copyright (C) 2019-2022 Mikhail Morfikov
|
||||
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
|
@ -11,29 +12,53 @@ profile pkexec @{exec_path} flags=(complain) {
|
|||
include <abstractions/base>
|
||||
include <abstractions/authentication>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/dbus-strict>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/wutmp>
|
||||
|
||||
signal (send) set=(term, kill) peer=polkit-agent-helper,
|
||||
|
||||
capability sys_ptrace,
|
||||
capability audit_write,
|
||||
capability dac_read_search,
|
||||
|
||||
# gdbus
|
||||
capability setgid,
|
||||
# gmain
|
||||
capability setuid,
|
||||
|
||||
# Needed?
|
||||
deny capability sys_nice,
|
||||
capability setgid, # gdbus
|
||||
capability setuid, # gmain
|
||||
capability sys_ptrace,
|
||||
audit deny capability sys_nice,
|
||||
|
||||
ptrace (read),
|
||||
|
||||
network netlink raw,
|
||||
|
||||
dbus (send) bus=system path=/org/freedesktop/PolicyKit[0-9]/Authority
|
||||
interface=org.freedesktop.DBus.Properties
|
||||
member=GetAll
|
||||
peer=(name=:*),
|
||||
|
||||
dbus (send) bus=system path=/org/freedesktop/PolicyKit[0-9]/Authority
|
||||
interface=org.freedesktop.PolicyKit[0-9].Authority
|
||||
member={EnumerateActions,CheckAuthorization,RegisterAuthenticationAgent,UnregisterAuthenticationAgent}
|
||||
peer=(name=:*),
|
||||
|
||||
dbus (receive) bus=system path=/org/freedesktop/PolicyKit[0-9]*/Authority
|
||||
interface=org.freedesktop.PolicyKit[0-9]*.Authority
|
||||
member=Changed
|
||||
peer=(name=:*),
|
||||
|
||||
dbus (receive) bus=system path=/org/freedesktop/PolicyKit[0-9]*/AuthenticationAgent
|
||||
interface=org.freedesktop.PolicyKit[0-9]*.AuthenticationAgent
|
||||
member=BeginAuthentication
|
||||
peer=(name=:*),
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
# Apps to be run via pkexec
|
||||
/{usr/,}{s,}bin/* rPUx,
|
||||
@{libexec}/gvfs/gvfsd-admin rPUx, #(#FIXME#)
|
||||
@{libexec}/polkit-agent-helper-[0-9] rPx,
|
||||
@{libexec}/polkit-[0-9]/polkit-agent-helper-[0-9] rPx,
|
||||
/{usr/,}lib/update-notifier/package-system-locked rPx,
|
||||
/usr/share/apport/apport-gtk rPx,
|
||||
|
||||
/etc/shells r,
|
||||
/etc/environment r,
|
||||
/etc/default/locale r,
|
||||
|
|
@ -42,28 +67,9 @@ profile pkexec @{exec_path} flags=(complain) {
|
|||
@{PROC}/@{pids}/stat r,
|
||||
owner @{PROC}/@{pid}/fd/ r,
|
||||
|
||||
# Apps to be run via pkexec
|
||||
/{usr/,}{s,}bin/* rPUx,
|
||||
/{usr/,}bin/* rPUx,
|
||||
/{usr/,}lib/gvfs/gvfsd-admin rPUx, #(#FIXME#)
|
||||
/{usr/,}lib/polkit-[0-9]/polkit-agent-helper-[0-9] rPx,
|
||||
/{usr/,}lib/update-notifier/package-system-locked rPx,
|
||||
|
||||
# file_inherit
|
||||
owner /dev/tty[0-9]* rw,
|
||||
owner @{HOME}/.xsession-errors w,
|
||||
|
||||
# DBus stricter
|
||||
@{run}/dbus/system_bus_socket rw,
|
||||
|
||||
dbus send
|
||||
bus="system" path="/org/freedesktop/DBus" interface="org.freedesktop.DBus" member="{Hello,AddMatch,StartServiceByName,GetNameOwner}" peer=(name="org.freedesktop.DBus"),
|
||||
|
||||
dbus send
|
||||
bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.DBus.Properties" member="{GetAll,CheckAuthorization}" peer=(name=":*"),
|
||||
|
||||
dbus send
|
||||
bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.PolicyKit1.Authority" peer=(name=":*"),
|
||||
|
||||
include if exists <local/pkexec>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue