apparmor.d/profiles/xarchiver

115 lines
2.8 KiB
Plaintext
Raw Normal View History

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
2021-01-10 16:35:07 +01:00
# 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.
#
# ------------------------------------------------------------------
2020-12-10 22:33:39 +01:00
abi <abi/3.0>,
2020-12-10 22:33:39 +01:00
include <tunables/global>
@{exec_path} = /{usr/,}bin/xarchiver
profile xarchiver @{exec_path} {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
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/deny-root-dir-access>
@{exec_path} mrix,
2020-12-09 10:30:52 +01:00
/{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,
2021-03-13 09:47:36 +01:00
/{usr/,}bin/zstd rix,
# For deb packages
/{usr/,}bin/{,@{multiarch}-}ar rix,
/{usr/,}bin/xdg-open rCx -> open,
2021-03-13 09:47:36 +01:00
include <abstractions/dconf>
owner @{run}/user/[0-9]*/dconf/ rw,
owner @{run}/user/[0-9]*/dconf/user rw,
owner @{HOME}/.config/xarchiver/ rw,
owner @{HOME}/.config/xarchiver/xarchiverrc{,.*} rw,
owner @{HOME}/.bz2 rw,
/ r,
/home/ r,
#owner @{HOME}/ r,
#owner @{HOME}/** rw,
/media/ r,
/media/** rw,
/tmp/ r,
owner /tmp/** rw,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
owner @{PROC}/@{pid}/fd/ r,
@{PROC}/@{pid}/mountinfo r,
@{PROC}/@{pid}/mounts r,
/etc/fstab r,
# Allowed apps to open
/{usr/,}bin/engrampa rPUx,
/{usr/,}bin/geany rPUx,
/{usr/,}bin/viewnior rPUx,
# file_inherit
owner /dev/tty[0-9]* rw,
profile open {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
include <abstractions/xdg-open>
/{usr/,}bin/xdg-open mr,
2021-02-13 15:00:16 +01:00
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/gawk rix,
/{usr/,}bin/readlink rix,
/{usr/,}bin/basename rix,
2020-12-09 10:30:52 +01:00
owner @{HOME}/ r,
owner @{run}/user/[0-9]*/ r,
# Allowed apps to open
/{usr/,}bin/engrampa rPUx,
/{usr/,}bin/geany rPUx,
/{usr/,}bin/viewnior rPUx,
# file_inherit
owner @{HOME}/.xsession-errors w,
}
2020-12-10 22:33:39 +01:00
include if exists <local/xarchiver>
}