2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2018-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
|
|
|
|
|
|
|
@{CHROME_INSTALLDIR} = /opt/google/chrome{,-beta,-unstable}
|
|
|
|
@{CHROME_HOMEDIR} = @{HOME}/.config/google-chrome{,-beta,-unstable}
|
|
|
|
@{CHROME_CACHEDIR} = @{HOME}/.cache/google-chrome{,-beta,-unstable}
|
|
|
|
|
|
|
|
@{exec_path} = @{CHROME_INSTALLDIR}/chrome-sandbox
|
|
|
|
profile google-chrome-chrome-sandbox @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/deny-root-dir-access>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
# For kernel unprivileged user namespaces
|
|
|
|
capability sys_admin,
|
|
|
|
capability sys_chroot,
|
|
|
|
capability setuid,
|
|
|
|
capability setgid,
|
|
|
|
|
|
|
|
# optional
|
|
|
|
capability sys_resource,
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{CHROME_INSTALLDIR}/chrome rPx,
|
|
|
|
@{CHROME_INSTALLDIR}/nacl_helper rix,
|
|
|
|
|
|
|
|
deny @{sys}/devices/system/cpu/cpufreq/policy[0-9]/cpuinfo_max_freq r,
|
|
|
|
|
|
|
|
@{PROC} r,
|
|
|
|
@{PROC}/@{pids}/ r,
|
|
|
|
owner @{PROC}/@{pid}/fd/ r,
|
|
|
|
deny owner @{PROC}/@{pid}/oom_{,score_}adj rw,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/google-chrome-chrome-sandbox>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|