2021-04-01 17:17:47 +02:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
|
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
2024-02-07 00:16:21 +01:00
|
|
|
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
2021-04-01 17:17:47 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
abi <abi/3.0>,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2023-07-09 15:59:53 +02:00
|
|
|
@{exec_path} = @{bin}/xarchiver
|
2020-09-12 17:19:23 +02:00
|
|
|
profile xarchiver @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
2022-06-09 22:55:55 +02:00
|
|
|
include <abstractions/dconf-write>
|
2020-12-10 22:33:39 +01:00
|
|
|
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>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} mrix,
|
|
|
|
|
2024-02-11 15:34:46 +01:00
|
|
|
@{sh_path} rix,
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/ls rix,
|
|
|
|
@{bin}/rm rix,
|
|
|
|
@{bin}/mv rix,
|
|
|
|
@{bin}/cp rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# Archivers
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/7z rix,
|
|
|
|
@{lib}/p7zip/7z rix,
|
|
|
|
@{bin}/unrar-nonfree rix,
|
|
|
|
@{bin}/zip rix,
|
|
|
|
@{bin}/unzip rix,
|
|
|
|
@{bin}/tar rix,
|
|
|
|
@{bin}/xz rix,
|
|
|
|
@{bin}/bzip2 rix,
|
|
|
|
@{bin}/cpio rix,
|
|
|
|
@{bin}/gzip rix,
|
|
|
|
@{bin}/zstd rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
# For deb packages
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/{,@{multiarch}-}ar rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/xdg-open rCx -> open,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2021-04-01 18:21:33 +02:00
|
|
|
owner @{user_config_dirs}/xarchiver/ rw,
|
|
|
|
owner @{user_config_dirs}/xarchiver/xarchiverrc{,.*} rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
owner @{HOME}/.bz2 rw,
|
|
|
|
|
|
|
|
/ r,
|
|
|
|
/home/ r,
|
|
|
|
#owner @{HOME}/ r,
|
|
|
|
#owner @{HOME}/** rw,
|
2021-04-19 16:20:32 +02:00
|
|
|
@{MOUNTS}/ r,
|
|
|
|
@{MOUNTS}/** rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
/tmp/ r,
|
|
|
|
owner /tmp/** rw,
|
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
@{PROC}/@{pid}/mountinfo r,
|
|
|
|
@{PROC}/@{pid}/mounts r,
|
|
|
|
|
|
|
|
/etc/fstab r,
|
|
|
|
|
|
|
|
# Allowed apps to open
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/engrampa rPUx,
|
|
|
|
@{bin}/geany rPUx,
|
|
|
|
@{bin}/viewnior rPUx,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# file_inherit
|
2023-08-18 18:09:53 +02:00
|
|
|
owner /dev/tty@{int} rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
profile open {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/xdg-open>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/xdg-open mr,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2024-02-11 15:34:46 +01:00
|
|
|
@{sh_path} rix,
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/{m,g,}awk rix,
|
|
|
|
@{bin}/readlink rix,
|
|
|
|
@{bin}/basename rix,
|
2020-12-09 10:30:52 +01:00
|
|
|
|
|
|
|
owner @{HOME}/ r,
|
|
|
|
|
2021-04-18 20:00:15 +02:00
|
|
|
owner @{run}/user/@{uid}/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# Allowed apps to open
|
2023-07-09 15:59:53 +02:00
|
|
|
@{bin}/engrampa rPUx,
|
|
|
|
@{bin}/geany rPUx,
|
|
|
|
@{bin}/viewnior rPUx,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
owner @{HOME}/.xsession-errors w,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/xarchiver>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|