Skip to content

Commit

Permalink
tst_test.sh: IMA: Allow to disable LSM warnings and use it for IMA
Browse files Browse the repository at this point in the history
we are printing a hint on a failure that SELinux or AppArmor may have caused
the failure and we want a knob to disable it and use it for IMA.

Link: https://lore.kernel.org/ltp/[email protected]/
Suggested-by: Mimi Zohar <[email protected]>
Reviewed-by: Mimi Zohar <[email protected]>
Reviewed-by: Cyril Hrubis <[email protected]>
Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Jan 31, 2025
1 parent 30f1849 commit 8d4e8cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions testcases/kernel/security/integrity/ima/tests/ima_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ TST_CLEANUP_CALLER="$TST_CLEANUP"
TST_CLEANUP="ima_cleanup"
TST_NEEDS_ROOT=1
TST_MOUNT_DEVICE=1
TST_SKIP_LSM_WARNINGS=1

# TST_MOUNT_DEVICE can be unset, therefore specify explicitly
TST_NEEDS_TMPDIR=1
Expand Down
4 changes: 2 additions & 2 deletions testcases/lib/tst_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) Linux Test Project, 2014-2022
# Copyright (c) Linux Test Project, 2014-2025
# Author: Cyril Hrubis <[email protected]>
#
# LTP test library for shell.
Expand Down Expand Up @@ -81,7 +81,7 @@ _tst_do_exit()
fi

if [ $TST_BROK -gt 0 -o $TST_FAIL -gt 0 -o $TST_WARN -gt 0 ]; then
_tst_check_security_modules
[ -z "$TST_SKIP_LSM_WARNINGS" ] && _tst_check_security_modules
fi

cat >&2 << EOF
Expand Down

0 comments on commit 8d4e8cf

Please sign in to comment.