
Directory integrity verification requires directory hash value to be set to security.ima. This patch provides directory hash calculation. Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
15 lines
250 B
Bash
Executable File
15 lines
250 B
Bash
Executable File
#!/bin/sh
|
|
|
|
verbose=""
|
|
if [ "$1" = "-v" ] ; then
|
|
verbose="-v"
|
|
shift 1
|
|
fi
|
|
|
|
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 '{}' \;
|
|
|