2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# 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-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
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}bin/appstreamcli
|
|
|
|
profile appstreamcli @{exec_path} flags=(complain) {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
# For file valudation using the network
|
|
|
|
/{usr/,}bin/curl rCx -> curl,
|
|
|
|
|
|
|
|
/etc/appstream.conf r,
|
|
|
|
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
|
|
|
|
owner @{HOME}/.cache/ rw,
|
|
|
|
owner @{HOME}/.cache/appstream-cache-*.mdb rw,
|
|
|
|
|
|
|
|
/usr/share/appdata/ r,
|
|
|
|
/var/lib/app-info/yaml/ r,
|
|
|
|
/var/lib/app-info/yaml/*_Components-*.yml.gz w,
|
|
|
|
|
|
|
|
owner /var/cache/app-info/{,**} rw,
|
|
|
|
owner /tmp/appstream-cache-*.mdb rw,
|
2021-03-13 09:47:36 +01:00
|
|
|
owner /tmp/appstream/ rw,
|
|
|
|
owner /tmp/appstream/appcache-*.mdb rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
owner @{HOME}/.local/share/mime/mime.cache r,
|
|
|
|
/usr/share/mime/mime.cache r,
|
|
|
|
|
|
|
|
/usr/share/applications/{,*.desktop} r,
|
|
|
|
|
|
|
|
/usr/share/metainfo/ r,
|
|
|
|
/usr/share/metainfo/*.{metainfo,appdata}.xml r,
|
|
|
|
|
|
|
|
/var/lib/apt/lists/ r,
|
|
|
|
/var/lib/apt/lists/*_Components-*.gz r,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
/var/log/cron-apt/temp w,
|
|
|
|
|
|
|
|
|
|
|
|
profile curl {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/openssl>
|
|
|
|
include <abstractions/ssl_certs>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}bin/curl mr,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/appstreamcli>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|