summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsanity.sh32
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'