* [LTP] [PATCH] tst_security.sh: Fix bug in tst_disable_selinux()
@ 2026-06-16 9:22 Avinesh Kumar via ltp
2026-06-16 10:09 ` [LTP] " linuxtestproject.agent
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Avinesh Kumar via ltp @ 2026-06-16 9:22 UTC (permalink / raw)
To: ltp
tst_disable_selinux() used "cat 0 > $f" which attempts to read a file
named "0" instead of writing the value 0 to the enforce file. Replace
with "echo 0 > $f" to correctly disable SELinux enforcing mode.
Reported by ltp-agent [0]
[0] https://lore.kernel.org/ltp/20260615131754.3990-1-linuxtestproject.agent@gmail.com/
Signed-off-by: Avinesh Kumar <avinesh.kumar@suse.com>
---
testcases/lib/tst_security.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/lib/tst_security.sh b/testcases/lib/tst_security.sh
index 820736c72..ab1dff816 100644
--- a/testcases/lib/tst_security.sh
+++ b/testcases/lib/tst_security.sh
@@ -119,7 +119,7 @@ tst_disable_selinux()
local f="$(tst_get_enforce)"
- [ -f "$f" ] && cat 0 > $f
+ [ -f "$f" ] && echo 0 > $f
}
# Get SELinux directory path
--
2.54.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] tst_security.sh: Fix bug in tst_disable_selinux()
2026-06-16 9:22 [LTP] [PATCH] tst_security.sh: Fix bug in tst_disable_selinux() Avinesh Kumar via ltp
@ 2026-06-16 10:09 ` linuxtestproject.agent
2026-06-16 10:43 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-06-16 10:43 ` Andrea Cervesato via ltp
2 siblings, 0 replies; 4+ messages in thread
From: linuxtestproject.agent @ 2026-06-16 10:09 UTC (permalink / raw)
To: Avinesh Kumar; +Cc: ltp
Hi Avinesh,
On Tue, 16 Jun 2026 11:22:59 +0200, Avinesh Kumar wrote:
> tst_security.sh: Fix bug in tst_disable_selinux()
Verdict - Reviewed
---
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] tst_security.sh: Fix bug in tst_disable_selinux()
2026-06-16 9:22 [LTP] [PATCH] tst_security.sh: Fix bug in tst_disable_selinux() Avinesh Kumar via ltp
2026-06-16 10:09 ` [LTP] " linuxtestproject.agent
@ 2026-06-16 10:43 ` Andrea Cervesato via ltp
2026-06-16 10:43 ` Andrea Cervesato via ltp
2 siblings, 0 replies; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-16 10:43 UTC (permalink / raw)
To: Avinesh Kumar via ltp; +Cc: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] tst_security.sh: Fix bug in tst_disable_selinux()
2026-06-16 9:22 [LTP] [PATCH] tst_security.sh: Fix bug in tst_disable_selinux() Avinesh Kumar via ltp
2026-06-16 10:09 ` [LTP] " linuxtestproject.agent
2026-06-16 10:43 ` [LTP] [PATCH] " Andrea Cervesato via ltp
@ 2026-06-16 10:43 ` Andrea Cervesato via ltp
2 siblings, 0 replies; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-16 10:43 UTC (permalink / raw)
To: Avinesh Kumar via ltp; +Cc: ltp
Merged, Thanks!
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-16 10:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-16 9:22 [LTP] [PATCH] tst_security.sh: Fix bug in tst_disable_selinux() Avinesh Kumar via ltp
2026-06-16 10:09 ` [LTP] " linuxtestproject.agent
2026-06-16 10:43 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-06-16 10:43 ` Andrea Cervesato via ltp
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.