mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
Merge pull request #118 from konstruktoid/issue117
use stat to verify permissions
This commit is contained in:
commit
3d7f124b89
1 changed files with 1 additions and 2 deletions
|
@ -402,8 +402,7 @@ fi
|
||||||
check_3_26="3.26 - Verify that Docker socket file permissions are set to 660"
|
check_3_26="3.26 - Verify that Docker socket file permissions are set to 660"
|
||||||
file="/var/run/docker.sock"
|
file="/var/run/docker.sock"
|
||||||
if [ -S "$file" ]; then
|
if [ -S "$file" ]; then
|
||||||
perms=$(ls -ld "$file" | awk '{print $1}')
|
if [ "$(stat -c %a $file)" -eq 660 ]; then
|
||||||
if [ "$perms" = "srw-rw----" ]; then
|
|
||||||
pass "$check_3_26"
|
pass "$check_3_26"
|
||||||
else
|
else
|
||||||
warn "$check_3_26"
|
warn "$check_3_26"
|
||||||
|
|
Loading…
Reference in a new issue