mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
from ls to stat
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
3059cef2c3
commit
0c61ddb6dd
1 changed files with 2 additions and 3 deletions
|
@ -232,10 +232,9 @@ fi
|
|||
check_3_16="3.16 - Verify that /etc/docker directory permissions are set to 755"
|
||||
directory="/etc/docker"
|
||||
if [ -d "$directory" ]; then
|
||||
perms=$(ls -ld $directory | awk '{print $1}')
|
||||
if [ "$perms" = "drwxr-xr-x." ]; then
|
||||
if [ "$(stat -c %a $directory)" -eq 755 ]; then
|
||||
pass "$check_3_16"
|
||||
elif [ "$perms" = "drwx------" ]; then
|
||||
elif [ "$(stat -c %a $directory)" -eq 700 ]; then
|
||||
pass "$check_3_16"
|
||||
else
|
||||
warn "$check_3_16"
|
||||
|
|
Loading…
Reference in a new issue