All of lore.kernel.org
 help / color / mirror / Atom feed
From: Egor Petrov <egor.petrov@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] Fixed SELinux path check in tst_get_enforce()
Date: Wed, 18 Aug 2021 14:04:40 +0300	[thread overview]
Message-ID: <20210818110440.285-1-egor.petrov@oracle.com> (raw)

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


             reply	other threads:[~2021-08-18 11:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 11:04 Egor Petrov [this message]
2021-08-19  3:40 ` [LTP] [PATCH] Fixed SELinux path check in tst_get_enforce() Li Wang
2021-08-19  6:07   ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818110440.285-1-egor.petrov@oracle.com \
    --to=egor.petrov@oracle.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.