We run as root, therefore 'sg' can be run without 'sudo'.
Fixes: 5734da5f11 ("IMA: Add tests for uid, gid, fowner, and fgroup options")
Signed-off-by: Petr Vorel <[email protected]>
---
.../kernel/security/integrity/ima/tests/ima_conditionals.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/security/integrity/ima/tests/ima_conditionals.sh
b/testcases/kernel/security/integrity/ima/tests/ima_conditionals.sh
index afa2ae05da..f4ee79b2bc 100755
--- a/testcases/kernel/security/integrity/ima/tests/ima_conditionals.sh
+++ b/testcases/kernel/security/integrity/ima/tests/ima_conditionals.sh
@@ -81,7 +81,7 @@ test()
chown $IMA_USER $test_file
sh -c "$cmd"
;;
- gid) sudo sg $IMA_USER "sh -c '$cmd'";;
+ gid) sg $IMA_USER "sh -c '$cmd'";;
uid) sudo -n -u $IMA_USER sh -c "$cmd";;
esac
--
2.51.0