[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.224.44.207: ~ $
�
��^c@s�dZddlZddlZyddlmZWn!ek
rUddlmZnXddlZddlZddl	Z	ddl
Z
ddlmZd�Z
ddd��YZd	�Zd
d
d��YZdS(sU
Utilities for dealing with the compilation of modules and creation
of module tress.
i����N(tgetstatusoutputi(tdefaultscCs@tjd|�}t|�dkr8|dj�r8tStSdS(s'Check that a module name is valid.
    s[^a-zA-Z0-9_\-\.]iN(tretfindalltlentisalphatTruetFalse(tmodnametm((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyt
is_valid_name(s"t
ModuleTreecBsSeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Z
RS(	cCs||_d|_dS(N(RtNonetdirname(tselfR((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyt__init__2s	cCs|jS(N(R
(R((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytdir_name6scCs|jd|jdS(Nt/s.te(R
R(R((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytte_name9scCs|jd|jdS(NRs.fc(R
R(R((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytfc_name<scCs|jd|jdS(NRs.if(R
R(R((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytif_name?scCs|jd|jdS(NRs.pp(R
R(R((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytpackage_nameBscCs|jdS(Ns	/Makefile(R
(R((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyt
makefile_nameEscCs�|d|j|_tj|j�t|j�d�}|rS|jd|�n|jdtj��|j	�t|j
�d�j	�t|j�d�j	�t|j�d�j	�dS(NRtwsinclude (
RR
tostmkdirtopenRtwriteRtrefpolicy_makefiletcloseRRR(Rtparent_dirnametmakefile_includetfd((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytcreateHs
N(t__name__t
__module__RRRRRRRRR!(((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyR1s							cCs$tjjtjj|�d�dS(Nii(Rtpathtsplitexttsplit(t
sourcename((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytmodname_from_sourcenameXstModuleCompilercBs\eZdZd	d�Zd�Zd�Zd�Zed�Z	d�Z
d�Zd�ZRS(
stModuleCompiler eases running of the module compiler.

    The ModuleCompiler class encapsulates running the commandline
    module compiler (checkmodule) and module packager (semodule_package).
    You are likely interested in the create_module_package method.
    
    Several options are controlled via paramaters (only effects the 
    non-refpol builds):
    
     .mls          [boolean] Generate an MLS module (by passed -M to
                   checkmodule). True to generate an MLS module, false
                   otherwise.
                   
     .module       [boolean] Generate a module instead of a base module.
                   True to generate a module, false to generate a base.
                   
     .checkmodule  [string] Fully qualified path to the module compiler.
                   Default is /usr/bin/checkmodule.
                   
     .semodule_package [string] Fully qualified path to the module
                   packager. Defaults to /usr/bin/semodule_package.
     .output       [file object] File object used to write verbose
                   output of the compililation and packaging process.
    cCsXtj�|_t|_d|_d|_||_d|_t	j
�|_d|_dS(s�Create a ModuleCompiler instance, optionally with an
        output file object for verbose output of the compilation process.
        s/usr/bin/checkmodules/usr/bin/semodule_packagets
/usr/bin/makeN(
tselinuxtis_selinux_mls_enabledtmlsRtmoduletcheckmoduletsemodule_packagetoutputtlast_outputRRtrefpol_makefiletmake(RR1((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyRts					cCs-|jr |jj|d�n||_dS(Ns
(R1RR2(Rtstr((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyto�s	cCs0|j|�t|�\}}|j|�|S(N(R6R(RtcommandtrcR1((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytrun�s

cCsg|jd�}t|�dkr3td|��ndj|dd!�}|d}|d}||fS(s�Generate the module and policy package filenames from
        a source file name. The source file must be in the form
        of "foo.te". This will generate "foo.mod" and "foo.pp".
        
        Returns a tuple with (modname, policypackage).
        t.is,invalid sourcefile name %s (must end in .te)ii����s.mods.pp(R&RtRuntimeErrortjoin(RR't	splitnametbasenameRtpackagename((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyt
gen_filenames�s

cCs\|r|j|�nB|j|�\}}|j||�|j||�tj|�dS(s�Create a module package saved in a packagename from a
        sourcename.

        The create_module_package creates a module package saved in a
        file named sourcename (.pp is the standard extension) from a
        source file (.te is the standard extension). The source file
        should contain SELinux policy statements appropriate for a
        base or non-base module (depending on the setting of .module).

        Only file names are accepted, not open file objects or
        descriptors because the command line SELinux tools are used.

        On error a RuntimeError will be raised with a descriptive
        error message.
        N(trefpol_buildR@tcompiletpackageRtunlink(RR't	refpolicyRR?((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pytcreate_module_package�scCsI|jd|j}|j|�}|dkrEtd|j��ndS(Ns -f iscompilation failed:
%s(R4R3R9R;R2(RR'R7R8((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyRA�scCs�|jg}|jr%|jd�n|jr>|jd�n|jd�|j|�|j|�|jdj|��}|dkr�td|j��ndS(Ns-Ms-ms-ot iscompilation failed:
%s(R/R-tappendR.R9R<R;R2(RR'RtsR8((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyRB�s		


cCs~|jg}|jd�|j|�|jd�|j|�|jdj|��}|dkrztd|j��ndS(Ns-os-mRGispackaging failed [%s](R0RHR9R<R;R2(RRR?RIR8((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyRC�s



N(
R"R#t__doc__RRR6R9R@RRFRARBRC(((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyR)[s
						(((RJRttempfilet
subprocessRtImportErrortcommandsRtos.pathtshutilR+R*RR
RR(R)(((s5/usr/lib64/python2.7/site-packages/sepolgen/module.pyt<module>s
		'	

Filemanager

Name Type Size Permission Actions
.__init__.pyo.40009 File 142 B 0644
.access.pyo.40009 File 13.18 KB 0644
.audit.pyo.40009 File 22.33 KB 0644
.classperms.pyo.40009 File 3.16 KB 0644
.defaults.pyo.40009 File 2.87 KB 0644
.interfaces.pyo.40009 File 15.86 KB 0644
.lex.pyo.40009 File 19.24 KB 0644
.matching.pyo.40009 File 7.4 KB 0644
.module.pyo.40009 File 8.4 KB 0644
.objectmodel.pyo.40009 File 4.64 KB 0644
.output.pyo.40009 File 4.51 KB 0644
.refparser.pyo.40009 File 36.27 KB 0644
.refpolicy.pyo.40009 File 46.45 KB 0644
.sepolgeni18n.pyo.40009 File 410 B 0644
.util.pyo.40009 File 7.87 KB 0644
.yacc.pyo.40009 File 41.4 KB 0644
__init__.py File 0 B 0644
__init__.pyc File 142 B 0644
__init__.pyo File 142 B 0644
access.py File 12.33 KB 0644
access.pyc File 13.18 KB 0644
access.pyo File 13.18 KB 0644
audit.py File 23.64 KB 0644
audit.pyc File 22.33 KB 0644
audit.pyo File 22.33 KB 0644
classperms.py File 2.75 KB 0644
classperms.pyc File 3.16 KB 0644
classperms.pyo File 3.16 KB 0644
defaults.py File 2.69 KB 0644
defaults.pyc File 2.87 KB 0644
defaults.pyo File 2.87 KB 0644
interfaces.py File 16.21 KB 0644
interfaces.pyc File 15.86 KB 0644
interfaces.pyo File 15.86 KB 0644
lex.py File 32.86 KB 0644
lex.pyc File 19.24 KB 0644
lex.pyo File 19.24 KB 0644
matching.py File 8.45 KB 0644
matching.pyc File 7.4 KB 0644
matching.pyo File 7.4 KB 0644
module.py File 7.12 KB 0644
module.pyc File 8.4 KB 0644
module.pyo File 8.4 KB 0644
objectmodel.py File 6.37 KB 0644
objectmodel.pyc File 4.64 KB 0644
objectmodel.pyo File 4.64 KB 0644
output.py File 5.01 KB 0644
output.pyc File 4.51 KB 0644
output.pyo File 4.51 KB 0644
policygen.py File 16.31 KB 0644
policygen.pyc File 15.25 KB 0644
policygen.pyo File 15.18 KB 0644
refparser.py File 30.2 KB 0644
refparser.pyc File 36.27 KB 0644
refparser.pyo File 36.27 KB 0644
refpolicy.py File 27.31 KB 0644
refpolicy.pyc File 46.45 KB 0644
refpolicy.pyo File 46.45 KB 0644
sepolgeni18n.py File 912 B 0644
sepolgeni18n.pyc File 410 B 0644
sepolgeni18n.pyo File 410 B 0644
util.py File 5.41 KB 0644
util.pyc File 7.87 KB 0644
util.pyo File 7.87 KB 0644
yacc.py File 80.04 KB 0644
yacc.pyc File 41.4 KB 0644
yacc.pyo File 41.4 KB 0644