ima: add check for enforced appraise option

The "enforce" string is allowed as an option for ima_appraise= kernel
paramenter per kernel-paramenters.txt and should be considered on the
parameter setup checking as a matter of completeness. Also it allows futher
checking on the options being passed by the user.

Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
Bruno Meneguele 2020-09-04 16:40:57 -03:00 committed by Mimi Zohar
parent e44f128768
commit 4afb28ab03

View File

@ -31,6 +31,8 @@ static int __init default_appraise_setup(char *str)
ima_appraise = IMA_APPRAISE_LOG; ima_appraise = IMA_APPRAISE_LOG;
else if (strncmp(str, "fix", 3) == 0) else if (strncmp(str, "fix", 3) == 0)
ima_appraise = IMA_APPRAISE_FIX; ima_appraise = IMA_APPRAISE_FIX;
else if (strncmp(str, "enforce", 7) == 0)
ima_appraise = IMA_APPRAISE_ENFORCE;
#endif #endif
return 1; return 1;
} }