mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-01-19 01:18:16 +01:00
Create earlyoom
This commit is contained in:
parent
f0faf4ba52
commit
d9ce0d287d
1 changed files with 28 additions and 0 deletions
28
apparmor.d/profiles-a-f/earlyoom
Normal file
28
apparmor.d/profiles-a-f/earlyoom
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# apparmor.d - Full set of apparmor profiles
|
||||||
|
# Copyright (C) 2024 odomingao
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
abi <abi/3.0>,
|
||||||
|
|
||||||
|
include <tunables/global>
|
||||||
|
|
||||||
|
@{exec_path} = @{bin}/earlyoom
|
||||||
|
profile earlyoom @{exec_path} {
|
||||||
|
include <abstractions/base>
|
||||||
|
|
||||||
|
capability kill,
|
||||||
|
|
||||||
|
@{exec_path} mr,
|
||||||
|
|
||||||
|
@{PROC}/ r,
|
||||||
|
@{PROC}/@{pid}/cmdline r,
|
||||||
|
@{PROC}/@{pid}/comm r,
|
||||||
|
@{PROC}/@{pid}/oom_adj r,
|
||||||
|
@{PROC}/@{pid}/oom_score r,
|
||||||
|
@{PROC}/@{pid}/oom_score_adj r,
|
||||||
|
@{PROC}/@{pid}/stat r,
|
||||||
|
|
||||||
|
include if exists <local/earlyoom>
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:syntax=apparmor
|
Loading…
Reference in a new issue