mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-30 06:45:10 +01:00
181 lines
4.7 KiB
Text
181 lines
4.7 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /{usr/,}bin/engrampa
|
|
profile engrampa @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/dconf-write>
|
|
include <abstractions/X-strict>
|
|
include <abstractions/gtk>
|
|
include <abstractions/fonts>
|
|
include <abstractions/fontconfig-cache-read>
|
|
include <abstractions/freedesktop.org>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/user-download-strict>
|
|
include <abstractions/thumbnails-cache-read>
|
|
include <abstractions/dbus-session-strict>
|
|
include <abstractions/dbus-accessibility-strict>
|
|
include <abstractions/dbus-gtk>
|
|
include <abstractions/ibus>
|
|
|
|
dbus send bus=session path=/org/freedesktop/DBus
|
|
interface=org.freedesktop.DBus
|
|
member=GetId
|
|
peer=(name=org.freedesktop.DBus, label=dbus-daemon),
|
|
|
|
dbus send bus=session path=/ca/desrt/dconf/Writer/user
|
|
interface=ca.desrt.dconf.Writer
|
|
member={Change,Notify}
|
|
peer=(name=ca.desrt.dconf),
|
|
|
|
dbus send bus=session path=/org/gtk/Private/RemoteVolumeMonitor
|
|
interface=org.gtk.Private.RemoteVolumeMonitor
|
|
member={IsSupported,List}
|
|
peer=(name=:*),
|
|
|
|
dbus send bus=accessibility path=/org/a11y/atspi/accessible/root
|
|
interface=org.a11y.atspi.Socket
|
|
member=Embed
|
|
peer=(name=org.a11y.atspi.Registry),
|
|
|
|
dbus receive bus=accessibility path=/org/a11y/atspi/accessible/root
|
|
interface=org.freedesktop.DBus.Properties
|
|
member=Set
|
|
peer=(name=:*),
|
|
|
|
dbus send bus=session path=/org/gtk/vfs/mounttracker
|
|
interface=org.gtk.vfs.MountTracker
|
|
member={ListMounts2,LookupMount}
|
|
peer=(name=:*),
|
|
|
|
dbus receive bus=session path=/org/gtk/vfs/mounttracker
|
|
interface=org.gtk.vfs.MountTracker
|
|
member=Mounted
|
|
peer=(name=:*),
|
|
|
|
dbus send bus=session path=/org/gtk/vfs/Daemon
|
|
interface=org.gtk.vfs.Daemon
|
|
member=GetConnection
|
|
peer=(name=:*),
|
|
|
|
dbus receive bus=session path=/org/gtk/Application/anonymous
|
|
interface=org.freedesktop.DBus.Properties
|
|
member=GetAll
|
|
peer=(name=:*),
|
|
|
|
dbus receive bus=session path=/org/gtk/Application/anonymous{,/window/[0-9]*}
|
|
interface=org.gtk.Actions
|
|
member=DescribeAll
|
|
peer=(name=:*),
|
|
|
|
@{exec_path} mr,
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
/{usr/,}bin/ls rix,
|
|
/{usr/,}bin/rm rix,
|
|
/{usr/,}bin/mv rix,
|
|
/{usr/,}bin/cp rix,
|
|
|
|
# Archivers
|
|
/{usr/,}bin/7z rix,
|
|
/{usr/,}lib/p7zip/7z rix,
|
|
/{usr/,}bin/unrar-nonfree rix,
|
|
/{usr/,}bin/zip rix,
|
|
/{usr/,}bin/unzip rix,
|
|
/{usr/,}bin/tar rix,
|
|
/{usr/,}bin/xz rix,
|
|
/{usr/,}bin/bzip2 rix,
|
|
/{usr/,}bin/cpio rix,
|
|
/{usr/,}bin/gzip rix,
|
|
/{usr/,}bin/zstd rix,
|
|
# For deb packages
|
|
/{usr/,}bin/dpkg-deb rix,
|
|
|
|
/{usr/,}lib/@{multiarch}/glib-[0-9]*/gio-launch-desktop rCx -> open,
|
|
/{usr/,}bin/xdg-open rCx -> open,
|
|
|
|
owner @{user_config_dirs}/engrampa/ rw,
|
|
|
|
/ r,
|
|
/home/ r,
|
|
#owner @{HOME}/ r,
|
|
#owner @{HOME}/** rw,
|
|
@{MOUNTS}/ r,
|
|
@{MOUNTS}/** rw,
|
|
/tmp/ r,
|
|
owner /tmp/** rw,
|
|
|
|
owner @{user_cache_dirs}/ rw,
|
|
owner @{user_cache_dirs}/.fr-*/{,**} rw,
|
|
|
|
owner @{user_config_dirs}/ r,
|
|
owner @{user_config_dirs}/mimeapps.list{,.*} rw,
|
|
|
|
owner @{user_share_dirs}/ r,
|
|
|
|
/usr/share/engrampa/{,**} r,
|
|
|
|
/usr/share/**.desktop r,
|
|
/usr/share/**/icons/**.png r,
|
|
|
|
/etc/magic r,
|
|
|
|
/usr/share/glib-2.0/schemas/gschemas.compiled r,
|
|
|
|
# gnome-tiny
|
|
@{run}/mount/utab r,
|
|
|
|
owner @{PROC}/@{pid}/cgroup r,
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
@{PROC}/@{pid}/mountinfo r,
|
|
@{PROC}/@{pid}/mounts r,
|
|
|
|
/etc/fstab r,
|
|
|
|
# Allowed apps to open
|
|
/{usr/,}bin/engrampa rPx,
|
|
/{usr/,}bin/geany rPx,
|
|
/{usr/,}bin/viewnior rPUx,
|
|
/{usr/,}bin/spacefm rPx,
|
|
/{usr/,}bin/ristretto rPUx,
|
|
|
|
# file_inherit
|
|
owner /dev/tty[0-9]* rw,
|
|
|
|
deny owner @{user_share_dirs}/gvfs-metadata/{,*} r,
|
|
|
|
profile open {
|
|
include <abstractions/base>
|
|
include <abstractions/xdg-open>
|
|
|
|
/{usr/,}lib/@{multiarch}/glib-[0-9]*/gio-launch-desktop mr,
|
|
/{usr/,}bin/xdg-open mr,
|
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
/{usr/,}bin/{m,g,}awk rix,
|
|
/{usr/,}bin/readlink rix,
|
|
/{usr/,}bin/basename rix,
|
|
|
|
owner @{HOME}/ r,
|
|
|
|
owner @{run}/user/@{uid}/ r,
|
|
|
|
# Allowed apps to open
|
|
/{usr/,}bin/engrampa rPx,
|
|
/{usr/,}bin/geany rPx,
|
|
/{usr/,}bin/viewnior rPUx,
|
|
/{usr/,}bin/spacefm rPx,
|
|
|
|
# file_inherit
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
include if exists <local/engrampa_open>
|
|
}
|
|
|
|
include if exists <local/engrampa>
|
|
}
|