Skip to content

Commit

Permalink
/var/lib/canary permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
adrelanos committed Aug 29, 2023
1 parent d82cf03 commit 4be1827
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion usr/libexec/systemcheck/check_warrant_canary.bsh
Expand Up @@ -69,7 +69,13 @@ Check system clock. Recommended to check warrant canary manually."
export LC_TIME="C"
export TZ="UTC"

if ! test -w "/var/lib/canary" ; then
if ! test -d "/var/lib/canary" ; then
canary_folder_permission_issues
return 0
fi
local canary_unixtime_file_owner
canary_unixtime_file_owner=$(stat -c "%U" "/var/lib/canary/canary-unixtime.txt")
if [ "$canary_unixtime_file_owner" = "canary" ]; then
canary_folder_permission_issues
return 0
fi
Expand Down

0 comments on commit 4be1827

Please sign in to comment.