mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-06-28 07:36:43 +00:00
Merge 7fbec23d14
into 55a796e4cf
This commit is contained in:
commit
8debb1a6aa
1 changed files with 21 additions and 0 deletions
|
@ -275,3 +275,24 @@ else
|
|||
info "$check_1_18"
|
||||
info " * File not found"
|
||||
fi
|
||||
|
||||
|
||||
# 1.19
|
||||
check_1_19="1.19 (extra) - Check cgroup limit for memory and swap"
|
||||
file="/proc/cmdline"
|
||||
if [ -f "$file" ]; then
|
||||
swaplimit=`cat $file | grep "swapaccount=1"`
|
||||
s_ret=$?
|
||||
cgroup_mem=`cat $file | grep "cgroup_enable=memory"`
|
||||
c_ret=$?
|
||||
|
||||
if [ $s_ret -eq 0 ] && [ $c_ret -eq 0 ]; then
|
||||
pass "$check_1_19"
|
||||
else
|
||||
warn "$check_1_19"
|
||||
info " * swapaccount=1 or cgroup_enable=memory not present in /etc/default/grub"
|
||||
fi
|
||||
else
|
||||
info "$check_1_19"
|
||||
info " * File not found"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue