[PATCH 2/2] selinux-testsuite: fix nnp test for RHEL7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RHEL7.3 backported the support for bounded transitions under
NO_NEW_PRIVS.  Since the kernel version comparison is against
the upstream kernel version that first included this support,
the test was failing on RHEL7.  Adjust the logic so that we do
not treat it as an error if earlier kernels correctly return
success (i.e. they contain the back-ported patch).

Signed-off-by: Stephen Smalley <sds@xxxxxxxxxxxxx>
---
 tests/nnp/execnnp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/nnp/execnnp.c b/tests/nnp/execnnp.c
index 8421df4..d8f1986 100644
--- a/tests/nnp/execnnp.c
+++ b/tests/nnp/execnnp.c
@@ -48,9 +48,7 @@ int main(int argc, char **argv)
 
 	pid = wait(&status);
 	if (WIFEXITED(status)) {
-		if (nobounded) {
-			if (!WEXITSTATUS(status))
-				exit(-1);
+		if (WEXITSTATUS(status) && nobounded) {
 			printf("%s:  Kernels < v3.18 do not support bounded transitions under NNP.\n",
 			       argv[0]);
 			/* pass the test */
-- 
2.7.4

_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux