Scripts for searching not only root owned files
authorDmitry Kasatkin <dmitry.kasatkin@intel.com>
Fri, 2 Dec 2011 12:15:19 +0000 (14:15 +0200)
committerDmitry Kasatkin <dmitry.kasatkin@intel.com>
Fri, 2 Dec 2011 12:15:19 +0000 (14:15 +0200)
-uid 0 removed.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
tests/evm_hmac_all.sh
tests/evm_hmac_modules.sh
tests/evm_sign_all.sh
tests/evm_sign_modules.sh
tests/ima_fix_dir.sh

index de269f5..fc5b9e9 100755 (executable)
@@ -10,5 +10,5 @@ dir=${1:-/}
 
 echo "Label: $dir"
 
-find $dir \( -fstype rootfs -o -fstype ext3 -o -fstype ext4 \)  \( -type f -o -type d \) -uid 0 -exec evmctl hmac --imahash $verbose '{}' \;
+find $dir \( -fstype rootfs -o -fstype ext3 -o -fstype ext4 \) \( -type f -o -type d \) -exec evmctl hmac --imahash $verbose '{}' \;
 
index 006da5b..edcc388 100755 (executable)
@@ -10,6 +10,5 @@ dir=${1:-/lib/modules}
 
 echo "HMAC modules: $dir"
 
-find $dir -name "*.ko" -type f -uid 0 -exec evmctl hmac --imasig $verbose '{}' \;
-find $dir ! -name "*.ko" -type f -uid 0 -exec evmctl hmac --imahash $verbose '{}' \;
+find $dir -name "*.ko" -type f -exec evmctl hmac --imasig $verbose '{}' \;
 
index 0aa8b9c..72268cd 100755 (executable)
@@ -10,5 +10,5 @@ dir=${1:-/}
 
 echo "Label: $dir"
 
-find $dir \( -fstype rootfs -o -fstype ext3 -o -fstype ext4 \) -type f -uid 0 -exec evmctl sign --imahash $verbose '{}' \;
+find $dir \( -fstype rootfs -o -fstype ext3 -o -fstype ext4 \) -type f -exec evmctl sign --imahash $verbose '{}' \;
 
index 60609ee..97da501 100755 (executable)
@@ -10,6 +10,5 @@ dir=${1:-/lib/modules}
 
 echo "Signing modules: $dir"
 
-find $dir -name "*.ko" -type f -uid 0 -exec evmctl sign --imasig $verbose '{}' \;
-find $dir ! -name "*.ko" -type f -uid 0 -exec evmctl sign --imahash $verbose '{}' \;
+find $dir -name "*.ko" -type f -exec evmctl sign --imasig $verbose '{}' \;
 
index c1a1e88..96f478d 100755 (executable)
@@ -4,5 +4,5 @@ dir=${1:-/}
 
 echo "Fixing dir: $dir"
 
-find $dir \( -fstype rootfs -o -fstype ext3 -o -fstype ext4 \) -type f -uid 0 -exec openclose '{}' \;
+find $dir \( -fstype rootfs -o -fstype ext3 -o -fstype ext4 \) -type f -exec openclose '{}' \;