mirror of
https://github.com/m1ngsama/TNT.git
synced 2026-02-08 08:54:05 +00:00
fix(test): make stat command cross-platform in security tests
This commit is contained in:
parent
c120cb5ac5
commit
8a5ffb1722
1 changed files with 6 additions and 1 deletions
|
|
@ -67,7 +67,12 @@ if [ -f host_key ]; then
|
|||
fi
|
||||
|
||||
# Check permissions
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
PERMS=$(stat -f "%OLp" host_key)
|
||||
else
|
||||
PERMS=$(stat -c "%a" host_key)
|
||||
fi
|
||||
|
||||
if [ "$PERMS" = "600" ]; then
|
||||
pass "Host key has secure permissions (600)"
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue