Skip to content

Commit 325f519

Browse files
committed
ima_setup.sh: Improve TINFO in verify_ima_policy()
* Add WARNING: for important TINFO * Add TINFO about suitable policy * Document verify_ima_policy return code Signed-off-by: Petr Vorel <[email protected]>
1 parent fca83df commit 325f519

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

testcases/kernel/security/integrity/ima/tests/ima_setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ print_ima_config()
162162
# When missing CONFIG_IMA_READ_POLICY=y on required policy convert: test, but convert TFAIL => TCONF.
163163
# $REQUIRED_POLICY_CONTENT: file with required IMA policy
164164
# $REQUIRED_BUILTIN_POLICY: IMA policy specified as kernel cmdline
165+
# return: 1 if need to load policy 0 otherwise
165166
verify_ima_policy()
166167
{
167168
local check_content line
@@ -194,8 +195,9 @@ verify_ima_policy()
194195
return 1
195196
fi
196197
done < $file
198+
tst_res TINFO "SUT has required policy content"
197199
else
198-
tst_res TINFO "policy is not readable, failure will be treated as TCONF"
200+
tst_res TINFO "WARNING: policy is not readable, failure will be treated as TCONF"
199201
IMA_FAIL="TCONF"
200202
IMA_BROK="TCONF"
201203
return 1

0 commit comments

Comments
 (0)