apparmor.d/apparmor.d/profiles-g-l/hugo
2021-12-08 17:38:43 +00:00

34 lines
No EOL
739 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2021 Mikhail Morfikov
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/hugo
profile hugo @{exec_path} {
include <abstractions/base>
network inet stream,
network inet6 stream,
@{exec_path} mr,
/usr/share/mime/{,**} r,
/etc/mime.types r,
owner @{HOME}/@{XDG_PROJECTS_DIR}/{,**} rw,
owner @{HOME}/@{XDG_PROJECTS_DIR}/**/.hugo_build.lock rwk,
owner /tmp/hugo_cache/ rw,
owner /tmp/hugo_cache/**/ rw,
@{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r,
@{PROC}/sys/net/core/somaxconn r,
include if exists <local/hugo>
}