mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 08:12:34 +01:00
fix socket check
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
2024e16f09
commit
683c5a92b5
1 changed files with 2 additions and 2 deletions
|
@ -600,7 +600,7 @@ check_3_23() {
|
|||
starttestjson "$id" "$desc"
|
||||
|
||||
file="/run/containerd/containerd.sock"
|
||||
if [ -f "$file" ]; then
|
||||
if [ -S "$file" ]; then
|
||||
if [ "$(stat -c %U:%G $file)" = 'root:root' ]; then
|
||||
pass -s "$check"
|
||||
logcheckresult "PASS"
|
||||
|
@ -625,7 +625,7 @@ check_3_24() {
|
|||
starttestjson "$id" "$desc"
|
||||
|
||||
file="/run/containerd/containerd.sock"
|
||||
if [ -f "$file" ]; then
|
||||
if [ -S "$file" ]; then
|
||||
if [ "$(stat -c %a $file)" -le 660 ]; then
|
||||
pass -s "$check"
|
||||
logcheckresult "PASS"
|
||||
|
|
Loading…
Reference in a new issue