[PATCH 30/48] policycoreutils: sandbox: only complain if sandbox

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


   This patch looks good to me. acked.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7dHMMACgkQrlYvE4MpobMWZwCfazCywHW2689/4yhx7fvnC+Ni
+6EAoOAqRvgMHmKc0R43ilkO3OQvJXNT
=w1hq
-----END PGP SIGNATURE-----
>From 3e5be9b9f38e782350a16f89f8f14810f05068ee Mon Sep 17 00:00:00 2001
From: Eric Paris <eparis@xxxxxxxxxx>
Date: Thu, 1 Dec 2011 15:21:18 -0500
Subject: [PATCH 30/48] policycoreutils: sandbox: only complain if sandbox
 unable to launch

Instead of force an arbitrary 100 category requirement, only bomb if
there is a problem.  Error out if there are 0 categories or if we cannot
find a free category in a reasonable number of attempts.

Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
---
 policycoreutils/sandbox/sandbox |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/policycoreutils/sandbox/sandbox b/policycoreutils/sandbox/sandbox
index f2681ce..0ecb6be 100644
--- a/policycoreutils/sandbox/sandbox
+++ b/policycoreutils/sandbox/sandbox
@@ -124,12 +124,12 @@ def get_range():
               lowc,highc = level.split(".")
               low = int(lowc[1:])
               high = int(highc[1:])+1
-              if high - low < 100:
+              if high - low == 0:
                      raise IndexError
 
               return low,high
        except IndexError:
-              raise ValueError(_("User account must be setup with an MCS Range with more then 100 categories"))
+              raise ValueError(_("User account must be setup with an MCS Range"))
 
 def gen_mcs():
        low, high = get_range()
@@ -156,7 +156,7 @@ def gen_mcs():
               break
        if level:
               return level
-       raise ValueError(_("Failed to find any unused categories"))
+       raise ValueError(_("Failed to find any unused category sets.  Consider a larger MCS range for this user."))
 
 
 def fullpath(cmd):
-- 
1.7.7.4


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

  Powered by Linux