Hackfut Security File Manager
Current Path:
/usr/lib64/python2.6/site-packages/setools
usr
/
lib64
/
python2.6
/
site-packages
/
setools
/
📁
..
📄
__init__.py
(1.12 KB)
📄
__init__.pyc
(1.73 KB)
📄
__init__.pyo
(1.73 KB)
📄
_apol.so
(374.88 KB)
📄
_apol.so.4
(374.88 KB)
📄
_apol.so.4.3
(374.88 KB)
📄
_poldiff.so
(170.63 KB)
📄
_poldiff.so.1
(170.63 KB)
📄
_poldiff.so.1.3.2
(170.63 KB)
📄
_qpol.so
(229.57 KB)
📄
_qpol.so.1
(229.57 KB)
📄
_qpol.so.1.6
(229.57 KB)
📄
_seaudit.so
(191.6 KB)
📄
_seaudit.so.4
(191.6 KB)
📄
_seaudit.so.4.4
(191.6 KB)
📄
_sefs.so
(102.25 KB)
📄
_sefs.so.4
(102.25 KB)
📄
_sefs.so.4.0.3
(102.25 KB)
📄
_seinfo.so
(19.13 KB)
📄
_sesearch.so
(15.04 KB)
📄
apol.py
(63.93 KB)
📄
apol.pyc
(113.52 KB)
📄
apol.pyo
(113.52 KB)
📄
poldiff.py
(28.7 KB)
📄
poldiff.pyc
(52.85 KB)
📄
poldiff.pyo
(52.85 KB)
📄
qpol.py
(44.84 KB)
📄
qpol.pyc
(80.23 KB)
📄
qpol.pyo
(80.23 KB)
📄
seaudit.py
(28.43 KB)
📄
seaudit.pyc
(50.33 KB)
📄
seaudit.pyo
(50.33 KB)
📄
sefs.py
(9.54 KB)
📄
sefs.pyc
(16.97 KB)
📄
sefs.pyo
(16.97 KB)
Editing: __init__.py
#!/usr/bin/env python # Author: Thomas Liu <tliu@redhat.com> import _sesearch import _seinfo import types TYPE = _seinfo.TYPE ROLE = _seinfo.ROLE ATTRIBUTE = _seinfo.ATTRIBUTE PORT = _seinfo.PORT USER = _seinfo.USER ALLOW = 'allow' AUDITALLOW = 'auditallow' NEVERALLOW = 'neverallow' DONTAUDIT = 'dontaudit' SCONTEXT = 'scontext' TCONTEXT = 'tcontext' PERMS = 'permlist' CLASS = 'class' def sesearch(types, info): valid_types = [ALLOW, AUDITALLOW, NEVERALLOW, DONTAUDIT] for type in types: if type not in valid_types: raise ValueError("Type has to be in %s" % valid_types) info[type] = True perms = [] if PERMS in info: perms = info[PERMS] info[PERMS] = ",".join(info[PERMS]) dict_list = _sesearch.sesearch(info) if len(perms) != 0: dict_list = filter(lambda x: dict_has_perms(x, perms), dict_list) return dict_list def dict_has_perms(dict, perms): for perm in perms: if perm not in dict[PERMS]: return False return True def seinfo(setype, name=None): dict_list = _seinfo.seinfo(setype, name) return dict_list
Upload File
Create Folder