Security Enhanced Linux
What's New
Frequently Asked Questions
Background
Documents
License
Download
Participating
Mail List
Archives
Remaining Work
Contributors
Related Work
Press Releases
Information Assurance Research
NIARL In-house Research Areas
Mathematical Sciences Program
Sabbaticals
Computer & Information Sciences Research
Technology Transfer
Advanced Computing
Advanced Mathematics
Communications & Networking
Information Processing
Microelectronics
Other Technologies
Technology Fact Sheets
Publications
Related Links
|
SELinux Mailing List[PATCH] semanage: Use semanage_mls_enabled
From: Stephen Smalley <sds_at_tycho.nsa.gov>
Date: Wed, 12 Nov 2008 09:43:26 -0500
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
diff --git a/policycoreutils/semanage/semanage b/policycoreutils/semanage/semanage
index c34e594..eb0ac34 100644
import __builtin__ __builtin__.__dict__['_'] = unicode
-is_mls_enabled=selinux.is_selinux_mls_enabled()
-
def usage(message = ""):
store = a if o == "-r" or o == '--range': - if is_mls_enabled == 0: - raise ValueError(_("range not supported on Non MLS machines")) serange = a if o == "-l" or o == "--list": list = True if o == "-L" or o == '--level': - if is_mls_enabled == 0: - raise ValueError(_("range not supported on Non MLS machines")) selevel = a if o == "-p" or o == '--proto': diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py index c5379ac..8bf188a 100644 --- a/policycoreutils/semanage/seobject.py +++ b/policycoreutils/semanage/seobject.py @@ -35,14 +35,13 @@ except IOError: import __builtin__ __builtin__.__dict__['_'] = unicode
-is_mls_enabled = selinux.is_selinux_mls_enabled()
-
handle = None def get_handle(store): global handle + global is_mls_enabled handle = semanage_handle_create() if not handle:
file_types = {}
class setransRecords: def __init__(self): - if not is_mls_enabled: - raise ValueError(_("translations not supported on non-MLS machines")) self.filename = selinux.selinux_translations_path() try: fd = open(self.filename, "r") -- Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.Received on Wed 12 Nov 2008 - 09:44:46 EST |
|
Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009 |