mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
Merge pull request #444 from markdumay/partition
Support user namespaces in partition check (1.2.1)
This commit is contained in:
commit
f3e9c791ce
1 changed files with 5 additions and 1 deletions
|
@ -73,8 +73,12 @@ check_1_2_1() {
|
|||
starttestjson "$id_1_2_1" "$desc_1_2_1"
|
||||
|
||||
totalChecks=$((totalChecks + 1))
|
||||
docker_root_dir=$(docker info -f '{{ .DockerRootDir }}')
|
||||
if docker info | grep -q userns ; then
|
||||
docker_root_dir=$(readlink -f "$docker_root_dir/..")
|
||||
fi
|
||||
|
||||
if mountpoint -q -- "$(docker info -f '{{ .DockerRootDir }}')" >/dev/null 2>&1; then
|
||||
if mountpoint -q -- "$docker_root_dir" >/dev/null 2>&1; then
|
||||
pass "$check_1_2_1"
|
||||
resulttestjson "PASS"
|
||||
currentScore=$((currentScore + 1))
|
||||
|
|
Loading…
Reference in a new issue