apparmor.d/apparmor.d/update-ca-certificates

118 lines
2.9 KiB
Text
Raw Normal View History

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
2021-01-10 16:35:07 +01:00
# Copyright (C) 2020-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/,}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>
@{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-12-10 22:33:39 +01:00
/etc/ca-certificates/update.d/ r,
/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,
/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,
owner /tmp/ca-certificates{,.crt}.tmp.* rw,
2020-12-10 22:33:39 +01:00
# For shell pwd
/root/ r,
/usr/local/share/ r,
@{PROC}/filesystems r,
profile run-parts {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
/{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>
/etc/ca-certificates/update.d/jks-keystore mr,
2020-12-10 22:33:39 +01:00
/{usr/,}lib/ r,
/{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-12-09 10:30:52 +01:00
/{usr/,}bin/{,ba,da}sh rix,
/{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,
owner @{PROC}/@{pid}/cgroup r,
owner @{PROC}/@{pid}/mountinfo r,
2021-01-10 16:35:07 +01:00
@{sys}/fs/cgroup/** r,
2021-01-10 16:35:07 +01:00
owner /tmp/hsperfdata_*/ rw,
owner /tmp/hsperfdata_*/@{pid} rw,
}
2020-12-10 22:33:39 +01:00
include if exists <local/update-ca-certificates>
}