directory hash calculation

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>
This commit is contained in:
Dmitry Kasatkin
2011-12-01 18:40:27 +02:00
parent 874c0fd45c
commit b60f927609
2 changed files with 94 additions and 2 deletions

View File

@ -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 hmac --imahash $verbose '{}' \;
find $dir \( -fstype rootfs -o -fstype ext3 -o -fstype ext4 \) \( -type f -o -type d \) -uid 0 -exec evmctl hmac --imahash $verbose '{}' \;