Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
policycoreutils.14043
seobject_late_init.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File seobject_late_init.patch of Package policycoreutils.14043
Index: selinux-python-2.8/semanage/seobject.py =================================================================== --- selinux-python-2.8.orig/semanage/seobject.py 2018-05-24 18:21:09.000000000 +0000 +++ selinux-python-2.8/semanage/seobject.py 2020-02-04 16:11:06.886848929 +0000 @@ -1043,13 +1043,14 @@ class seluserRecords(semanageRecords): class portRecords(semanageRecords): - try: - valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"]) - except RuntimeError: - valid_types = [] + valid_types = [] def __init__(self, args = None): semanageRecords.__init__(self, args) + try: + valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"]) + except RuntimeError: + pass def __genkey(self, port, proto): if proto == "tcp": @@ -1807,14 +1808,15 @@ class ibendportRecords(semanageRecords): print(rec) class nodeRecords(semanageRecords): - try: - valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "node_type"))[0]["types"]) - except RuntimeError: - valid_types = [] + valid_types = [] def __init__(self, args = None): semanageRecords.__init__(self, args) self.protocol = ["ipv4", "ipv6"] + try: + valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "node_type"))[0]["types"]) + except RuntimeError: + pass def validate(self, addr, mask, protocol): newaddr = addr @@ -2238,15 +2240,16 @@ class interfaceRecords(semanageRecords): class fcontextRecords(semanageRecords): - try: - valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "file_type"))[0]["types"]) - valid_types += list(list(sepolicy.info(sepolicy.ATTRIBUTE, "device_node"))[0]["types"]) - valid_types.append("<<none>>") - except RuntimeError: - valid_types = [] + valid_types = [] def __init__(self, args = None): semanageRecords.__init__(self, args) + try: + valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "file_type"))[0]["types"]) + valid_types += list(list(sepolicy.info(sepolicy.ATTRIBUTE, "device_node"))[0]["types"]) + valid_types.append("<<none>>") + except RuntimeError: + pass self.equiv = {} self.equiv_dist = {} self.equal_ind = False
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor