59 lines
1.5 KiB
Text
59 lines
1.5 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/4.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{bin}/metadata-cleaner
|
|
profile metadata-cleaner @{exec_path} flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
include <abstractions/common/gnome>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/python>
|
|
include <abstractions/user-read-strict>
|
|
include <abstractions/user-write-strict>
|
|
|
|
@{exec_path} mr,
|
|
@{python_path} rix,
|
|
|
|
@{bin}/bwrap Cx -> bwrap,
|
|
@{open_path} Px -> child-open-help,
|
|
|
|
/usr/share/metadata-cleaner/src/metadatacleaner/{,*/}__pycache__/ w,
|
|
/usr/share/poppler/{,**} r,
|
|
|
|
/etc/httpd/conf/mime.types r,
|
|
/etc/mime.types r,
|
|
|
|
owner @{tmp}/@{hex64}.* rw,
|
|
owner @{tmp}/@{rand8} rw,
|
|
owner @{tmp}/tmp@{word8} rw,
|
|
owner @{tmp}/tmp@{word8}/{,**} rw,
|
|
|
|
@{run}/mount/utab r,
|
|
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
owner @{PROC}/@{pid}/mounts r,
|
|
|
|
deny owner @{user_share_dirs}/gvfs-metadata/* r,
|
|
deny owner @{user_cache_dirs}/thumbnails/** r,
|
|
|
|
profile bwrap flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
include <abstractions/common/bwrap>
|
|
include <abstractions/perl>
|
|
|
|
signal receive set=(kill) peer=metadata-cleaner,
|
|
|
|
@{bin}/bwrap mr,
|
|
@{bin}/vendor_perl/exiftool rix,
|
|
|
|
include if exists <local/metadata-cleaner_bwrap>
|
|
}
|
|
|
|
include if exists <local/metadata-cleaner>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|