diff options
author | John Turner <jturner.usa@gmail.com> | 2025-08-12 15:19:30 -0400 |
---|---|---|
committer | John Turner <jturner.usa@gmail.com> | 2025-08-12 15:19:30 -0400 |
commit | 2717ce006df61ae7abf84e4e32d3bbcd79b2acb9 (patch) | |
tree | 23231e9311c86eab944305b0f784853fe125c6c8 | |
parent | 060ff51b3314559e8776fe2b7ce0a567b8dea8b4 (diff) | |
download | selinux-policy-2717ce006df61ae7abf84e4e32d3bbcd79b2acb9.tar.gz |
add sanity.sh script
-rwxr-xr-x | sanity.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sanity.sh b/sanity.sh new file mode 100755 index 0000000..5a7d00b --- /dev/null +++ b/sanity.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +dirs=( + /bin + /boot + /dev + /esp + /etc + /home + /lib + /lib64 + /lost+found + /media + /opt + /proc + /root + /run + /sbin + /srv + /sys + /tmp + /usr + /var +) + +restorecon -T$(nproc) -Rvn ${dirs[@]} + +find ${dirs[@]} -context sys.id:sys.role:unlabeled:s0 -printf '%p %Z\n' + +find ${dirs[@]} -context sys.id:sys.role:invalid:s0 -printf '%p %Z\n' + +find ${dirs[@]} -context sys.id:sys.role:unknown.file:s0 -printf '%p %Z\n' |