mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
Changed to 'df' to support user namespaces
This commit is contained in:
parent
b6478e9367
commit
919816dbbf
1 changed files with 3 additions and 2 deletions
|
@ -73,8 +73,9 @@ check_1_2_1() {
|
||||||
starttestjson "$id_1_2_1" "$desc_1_2_1"
|
starttestjson "$id_1_2_1" "$desc_1_2_1"
|
||||||
|
|
||||||
totalChecks=$((totalChecks + 1))
|
totalChecks=$((totalChecks + 1))
|
||||||
|
local system_partition=$(df / --output=source 2> /dev/null | sed -n 2p)
|
||||||
if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then
|
local docker_partition=$(df "$(docker info -f '{{ .DockerRootDir }}')" --output=source 2> /dev/null | sed -n 2p)
|
||||||
|
if [ "$system_partition" != "$docker_partition" ] && [ ! -z "$docker_partition" ] ; then
|
||||||
pass "$check_1_2_1"
|
pass "$check_1_2_1"
|
||||||
resulttestjson "PASS"
|
resulttestjson "PASS"
|
||||||
currentScore=$((currentScore + 1))
|
currentScore=$((currentScore + 1))
|
||||||
|
|
Loading…
Reference in a new issue