All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] Fixed SELinux path check in tst_get_enforce()
@ 2021-08-18 11:04 Egor Petrov
  2021-08-19  3:40 ` Li Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Egor Petrov @ 2021-08-18 11:04 UTC (permalink / raw)
  To: ltp

tst_get_enforce() ignored the output from tst_get_selinux_dir() and
returned an empty string on systems with valid SELinux path while
expected to return path to the SELinux enforce. Fixed it.

Signed-off-by: Egor Petrov <egor.petrov@oracle.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 7ae6ddb61..05640234e 100644
--- a/testcases/lib/tst_security.sh
+++ b/testcases/lib/tst_security.sh
@@ -135,7 +135,7 @@ tst_get_selinux_dir()
 tst_get_enforce()
 {
 	local dir=$(tst_get_selinux_dir)
-	[ -z "$dir" ] || return
+	[ -z "$dir" ] && return
 
 	local f="$dir/enforce"
 	[ -f "$f" ] && echo "$f"
-- 
2.32.0.windows.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] Fixed SELinux path check in tst_get_enforce()
  2021-08-18 11:04 [LTP] [PATCH] Fixed SELinux path check in tst_get_enforce() Egor Petrov
@ 2021-08-19  3:40 ` Li Wang
  2021-08-19  6:07   ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2021-08-19  3:40 UTC (permalink / raw)
  To: ltp

Hi Egor,

Patch applied, thanks!

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210819/f956c6a0/attachment-0001.htm>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] Fixed SELinux path check in tst_get_enforce()
  2021-08-19  3:40 ` Li Wang
@ 2021-08-19  6:07   ` Petr Vorel
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-08-19  6:07 UTC (permalink / raw)
  To: ltp

Hi Egor,

> Hi Egor,

> Patch applied, thanks!
Thanks for fixing my error.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-19  6:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 11:04 [LTP] [PATCH] Fixed SELinux path check in tst_get_enforce() Egor Petrov
2021-08-19  3:40 ` Li Wang
2021-08-19  6:07   ` Petr Vorel

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.