apparmor.d/profiles/systemd-fsck
2021-04-01 16:02:59 +01:00

36 lines
900 B
Text

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
# 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.
#
# ------------------------------------------------------------------
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/systemd/systemd-fsck
profile systemd-fsck @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/disks-read>
include <abstractions/systemd-common>
capability sys_resource,
# Needed?
deny capability net_admin,
@{exec_path} mr,
/{usr/,}sbin/fsck rPx,
/{usr/,}sbin/e2fsck rPx,
owner @{run}/systemd/quotacheck w,
include if exists <local/systemd-fsck>
}