2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2020-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/,}sbin/update-ca-certificates
|
|
|
|
profile update-ca-certificates @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/ssl_certs>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} r,
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
|
|
|
|
|
|
|
/{usr/,}bin/basename rix,
|
|
|
|
/{usr/,}bin/cat rix,
|
|
|
|
/{usr/,}bin/chmod rix,
|
|
|
|
/{usr/,}bin/mktemp rix,
|
|
|
|
/{usr/,}bin/mv rix,
|
|
|
|
/{usr/,}bin/readlink rix,
|
|
|
|
/{usr/,}bin/rm rix,
|
|
|
|
/{usr/,}bin/sed rix,
|
|
|
|
/{usr/,}bin/sort rix,
|
|
|
|
/{usr/,}bin/wc rix,
|
|
|
|
/{usr/,}bin/find rix,
|
|
|
|
/{usr/,}bin/ln rix,
|
|
|
|
/{usr/,}bin/test rix,
|
|
|
|
|
|
|
|
/{usr/,}bin/openssl rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
/etc/ca-certificates/update.d/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
/etc/ca-certificates/update.d/jks-keystore rCx -> jks-keystore,
|
|
|
|
/{usr/,}bin/run-parts rCx -> run-parts,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
/etc/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
/etc/ca-certificates.conf r,
|
|
|
|
/etc/ssl/certs/ca-certificates.crt rw,
|
|
|
|
/etc/ssl/certs/*.pem rw,
|
|
|
|
/etc/ssl/certs/[0-9a-f]*.[0-9] rw,
|
|
|
|
|
|
|
|
/{usr/,}lib/locale/locale-archive r,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
/tmp/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner /tmp/ca-certificates{,.crt}.tmp.* rw,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
# For shell pwd
|
|
|
|
/root/ r,
|
|
|
|
|
|
|
|
/usr/local/share/ r,
|
|
|
|
|
2020-09-12 17:19:23 +02:00
|
|
|
@{PROC}/filesystems r,
|
|
|
|
|
|
|
|
|
|
|
|
profile run-parts {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/{usr/,}bin/run-parts mr,
|
|
|
|
|
|
|
|
/etc/ca-certificates/update.d/ r,
|
|
|
|
|
|
|
|
# file_inherit
|
|
|
|
owner /dev/pts/[0-9]* rw,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
profile jks-keystore {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
2021-01-10 16:35:07 +01:00
|
|
|
include <abstractions/consoles>
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/nameservice-strict>
|
|
|
|
include <abstractions/ssl_certs>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
/etc/ca-certificates/update.d/jks-keystore mr,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
/{usr/,}lib/ r,
|
2020-09-12 17:19:23 +02:00
|
|
|
/{usr/,}lib/jvm/java-[0-9]*-openjdk-*/jre/bin/java rix,
|
2020-12-10 22:33:39 +01:00
|
|
|
/{usr/,}lib/jvm/java-[0-9]*-openjdk-*/bin/java rix,
|
|
|
|
/{usr/,}lib/jvm/java-[0-9]*-openjdk-*/lib/server/classes.jsa mr,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-12-09 10:30:52 +01:00
|
|
|
/{usr/,}bin/{,ba,da}sh rix,
|
2020-09-12 17:19:23 +02:00
|
|
|
/{usr/,}bin/sed rix,
|
|
|
|
/{usr/,}bin/head rix,
|
|
|
|
/{usr/,}bin/mountpoint rix,
|
|
|
|
/{usr/,}bin/dpkg-query rPx,
|
|
|
|
/{usr/,}bin/dpkg rPx -> child-dpkg,
|
|
|
|
|
|
|
|
/usr/share/ca-certificates-java/ca-certificates-java.jar r,
|
|
|
|
/usr/share/java/java-atk-wrapper.jar r,
|
|
|
|
|
|
|
|
/etc/default/cacerts r,
|
|
|
|
/etc/ssl/certs/java/cacerts rw,
|
|
|
|
|
|
|
|
/etc/java-[0-9]*-openjdk/{,**} r,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
owner @{PROC}/@{pid}/coredump_filter rw,
|
|
|
|
owner @{PROC}/@{pid}/coredump rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
owner @{PROC}/@{pid}/cgroup r,
|
|
|
|
owner @{PROC}/@{pid}/mountinfo r,
|
|
|
|
|
2021-01-10 16:35:07 +01:00
|
|
|
@{sys}/fs/cgroup/** r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2021-01-10 16:35:07 +01:00
|
|
|
owner /tmp/hsperfdata_*/ rw,
|
|
|
|
owner /tmp/hsperfdata_*/@{pid} rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/update-ca-certificates>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|