apparmor.d/apparmor.d/groups/gvfs/gvfsd-smb-browse
2023-11-30 22:42:49 +00:00

68 lines
1.8 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2021 Mikhail Morfikov
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/{,gvfs/}gvfsd-smb-browse
profile gvfsd-smb-browse @{exec_path} {
include <abstractions/base>
include <abstractions/dbus-session-strict>
include <abstractions/dconf-write>
include <abstractions/nameservice-strict>
network netlink raw,
network inet stream,
network inet6 stream,
network inet dgram,
network inet6 dgram,
dbus send bus=session path=/org/freedesktop/DBus
interface=org.freedesktop.DBus
member={RequestName,ReleaseName}
peer=(name=org.freedesktop.DBus, label=dbus-daemon),
dbus send bus=session path=/org/gtk/vfs/mounttracker
interface=org.gtk.vfs.MountTracker
member=ListMounts2
peer=(name=:*, label=gvfsd),
dbus receive bus=session path=/org/gtk/vfs/mounttracker
interface=org.gtk.vfs.MountTracker
member=Mounted
peer=(name=:*, label=gvfsd),
dbus receive bus=session path=/org/gtk/vfs/mountable
interface=org.gtk.vfs.Mountable
member=Mount
peer=(name=:*, label=gvfsd),
dbus send bus=session path=/org/gtk/gvfs/exec_spaw/[0-9]*
interface=org.gtk.vfs.Spawner
member=Spawned
peer=(name=:*, label=gvfsd),
dbus bind bus=session
name=org.gtk.vfs.mountpoint_smb_browse,
@{exec_path} mr,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/etc/samba/* r,
/var/cache/samba/ rw,
/var/lib/samba/** rwk,
owner @{run}/samba/ rw,
owner @{run}/samba/gencache.tdb rwk,
owner @{run}/user/@{uid}/gvfsd/socket-@{rand8} rw,
owner @{user_cache_dirs}/samba/ w,
owner @{user_cache_dirs}/samba/gencache.tdb rwk,
include if exists <local/gvfsd-smb-browse>
}