diff mbox series

[v3,07/10] ima_setup.sh: Add digest index detection for ima-buf format

Message ID 20250114112915.610297-8-pvorel@suse.cz
State Accepted
Headers show
Series LTP tests: load predefined policy, enhancements | expand

Commit Message

Petr Vorel Jan. 14, 2025, 11:29 a.m. UTC
ima-buf format might be loaded via loading policy in the next commit.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/security/integrity/ima/tests/ima_setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mimi Zohar Feb. 3, 2025, 4 p.m. UTC | #1
On Tue, 2025-01-14 at 12:29 +0100, Petr Vorel wrote:
> ima-buf format might be loaded via loading policy in the next commit.
> 
> Signed-off-by: Petr Vorel <pvorel@suse.cz>


"ima-buf" is used in "[PATCH v3 05/10] IMA: Read required policy from file".

Otherwise, 
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>

> ---
>  testcases/kernel/security/integrity/ima/tests/ima_setup.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
> b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
> index af5584951c..1f01f18cf6 100644
> --- a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
> +++ b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
> @@ -242,7 +242,7 @@ set_digest_index()
>  	# parse digest index
>  	# https://www.kernel.org/doc/html/latest/security/IMA-templates.html#use
>  	case "$template" in
> -	ima|ima-ng|ima-sig) DIGEST_INDEX=4 ;;
> +	ima|ima-buf|ima-ng|ima-sig) DIGEST_INDEX=4 ;;
>  	*)
>  		# using ima_template_fmt kernel parameter
>  		local IFS="|"
diff mbox series

Patch

diff --git a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
index af5584951c..1f01f18cf6 100644
--- a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
+++ b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
@@ -242,7 +242,7 @@  set_digest_index()
 	# parse digest index
 	# https://www.kernel.org/doc/html/latest/security/IMA-templates.html#use
 	case "$template" in
-	ima|ima-ng|ima-sig) DIGEST_INDEX=4 ;;
+	ima|ima-buf|ima-ng|ima-sig) DIGEST_INDEX=4 ;;
 	*)
 		# using ima_template_fmt kernel parameter
 		local IFS="|"