apparmor.d/apparmor.d/groups/gvfs/gvfsd-trash
2022-06-05 22:57:29 +01:00

38 lines
953 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021-2022 Mikhail Morfikov
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/gvfs/gvfsd-trash
@{exec_path} += @{libexec}/gvfsd-trash
profile gvfsd-trash @{exec_path} {
include <abstractions/base>
include <abstractions/dbus-session-strict>
include <abstractions/freedesktop.org>
include <abstractions/nameservice-strict>
include <abstractions/trash>
# When mounting a SMB share
network inet stream,
network inet6 stream,
@{exec_path} mr,
# Can restore all user files
owner @{HOME}/{,**} rw,
owner @{MOUNTS}/*/{,**} rw,
owner @{run}/user/@{uid}/gvfsd/ rw,
owner @{run}/user/@{uid}/gvfsd/socket-* rw,
@{run}/mount/utab r,
owner @{PROC}/@{pid}/mountinfo r,
owner @{PROC}/@{pid}/mounts r,
include if exists <local/gvfsd-trash>
}