[LTP] tst_security.sh: Use enforce toggle to trigger SELinux measurement
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Fri Jun 12 21:07:50 CEST 2026
Hi Avinesh,
On Fri, 12 Jun 2026 18:38:04 +0200, Avinesh Kumar wrote:
> tst_security.sh: Use enforce toggle to trigger SELinux measurement
> + orig_val=$(cat $dir/enforce)
> + val=$((1 - orig_val))
> + echo $val > $dir/enforce
> + echo $orig_val > $dir/enforce
`orig_val` is not declared `local`, unlike `val` and `dir` in the
same function. This leaks `orig_val` into the caller's scope.
Should the declaration on line 145 be:
local val orig_val
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list