Skip to contentSkip to conversation

Fixed SELinux path check in tst_get_enforce()

PATCH New Egor Petrov 3 participants 3 messages Aug 18, 2021 – Aug 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed SELinux path check in tst_get_enforce()

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.

---
 testcases/lib/tst_security.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/lib/tst_security.sh +1 -1
index 7ae6ddb61..05640234e 100644
@@ -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"
Signature · 1 line
2.32.0.windows.2
#1 lore raw

PATCH 1/1 Fixed SELinux path check in tst_get_enforce()

Hi Egor,

Patch applied, thanks!

Signature · 5 lines
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210819/f956c6a0/attachment-0001.htm>
#2 lore raw

PATCH 1/1 Fixed SELinux path check in tst_get_enforce()

Hi Egor,

Quoted 3 lines

Hi Egor,

Patch applied, thanks!

Thanks for fixing my error.

Kind regards,
Petr