MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/site-packages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/seobject.pyo
mò
iì†Dc@s)dkZdkZdkZdkZdkZdkZdkZdkTdkl	Z	l
Z
eiƒZdk
Z
hZeed<eed<eed<eed<eed<eed<eed	<eed
<eed<eed<eed
<eed<eed<eed<eed<eed<y dkZdfd„ƒYZWndfd„ƒYZnXeƒZd„Zdd„Zdd„Zdfd„ƒYZdfd„ƒYZdefd„ƒYZd efd!„ƒYZ d"efd#„ƒYZ!d$efd%„ƒYZ"d&efd'„ƒYZ#d(efd)„ƒYZ$dS(*N(t*(t_sN_ts	all filess--sregular files-dt	directorys-cscharacter devices-bsblock devices-stsockets-ls
symbolic links-ps
named pipetloggercBs/tZd„Zdddddddd„ZRS(NcCstiƒ|_dS(N(tauditt
audit_opentselftaudit_fd(R((t,/usr/lib/python2.4/site-packages/seobject.pyt__init__5sRc

CsKti|ititid||d||||||	ddd|ƒdS(NiR(Rtaudit_log_semanage_messageRR	tAUDIT_USER_ROLE_CHANGEtsystargvtmsgtnametsenametseroletseranget
old_senamet
old_seroletold_serangetsuccess(
RRRRRRRRRR((R
tlog8s(t__name__t
__module__RR(((R
R4s	cBs&tZdddddddd„ZRS(NRc
Cs|djo
d}
nd}
|
d||f7}
|djo|
d|7}
n|djo|
d|7}
n|djo|
d|7}
n|djo|
d	|7}
n|djo|djo|
d
|7}
n|	djo|	djo|
d|	7}
nti|
ƒdS(NisSuccessful: sFailed: s %s name=%sRs sename=s old_sename=s role=s
 old_role=s
 MLSRange=s old_MLSRange=(RtmessageRRRRRRRtNoneRtsyslog(RRRRRRRRRRR((R
R<s"





(RRR(((R
R;scCsfd}d}|d|d}|d|d}|d|dd|d}tid	|d
|ƒS(Nss[0-9]*sc[0-9]*s(\.s)?s(\,s)*s(-s(:t^t$(tsensitivitytcategoryt	cat_ranget
categoriestregtretsearchtraw(R(R"R#R!R%R$((R
tvalidate_levelRsicCs‚|djod|}n|}ti|ƒ\}}|djo|Sn|o|idƒ}n|djo|Sn|SdS(Nisa:b:c:%sisa:b:cR(tprependR(tcontexttselinuxtselinux_raw_to_trans_contexttrcttranststrip(R(R*R+R.R/((R
t	translateZs


cCs‚|djod|}n|}ti|ƒ\}}|djo|Sn|o|idƒ}n|djo|Sn|SdS(Nisa:b:c:%sisa:b:cR(R*R/R+R,tselinux_trans_to_raw_contextR.R(R0(R/R*R(R+R.((R
tuntranslateis


tsetransRecordscBsStZd„Zd„Zd„Zdd„Zd„Zd„Zd„Zd	„Z	RS(
NcCs_tpttdƒƒ‚ntiƒ|_y,t|idƒ}|i	ƒ}|iƒWn4tj
o(}ttdƒ|i|fƒ‚nXh|_g|_x·|D]¯}t|ƒdjoq¨n|iƒ}|djp|ddjo|ii|ƒq¨n|idƒ}t|ƒdjo|ii|ƒq¨n|d	|i|d<q¨WdS(
Ns.translations not supported on non-MLS machinestrsAUnable to open %s: translations not supported on non-MLS machinesiRt#t=ii(tis_mls_enabledt
ValueErrorRR,tselinux_translations_pathRtfilenametopentfdt	readlinesttranslationstclosetIOErrortetddicttcommentsR5tlenR0titappendtsplit(RRBRFR?R5R=((R
Rzs0$		cCs|iS(N(RRC(R((R
tget_all”scCsqd}x|iD]}||d7}qW|iiƒ}|iƒx)|D]!}|d||i|f7}qHW|S(NRs
s%s=%s
(trecRRDtcRCtkeystsorttk(RRLRJRKRN((R
tout—s

icCsX|o
ddGHn|iiƒ}|iƒx$|D]}d||i|fGHq4WdS(Ns

%-25s %s
tLeveltTranslations%-25s %s(RPRQ(theadingRRCRLRMRN(RRRRLRN((R
tlist¡s

cCs¥|idƒdjottdƒ|ƒ‚nt|ƒdjottdƒ|ƒ‚n|ii	|ƒottdƒ|ƒ‚n||i|<|i
ƒdS(Nt is)Translations can not contain spaces '%s' sInvalid Level '%s' s"%s already defined in translations(R/tfindR9RR)R(RRRCthas_keytsave(RR(R/((R
tadd©s
cCsx|idƒdjottdƒ|ƒ‚n|ii|ƒo||i|<nttdƒ|ƒ‚|iƒdS(NRTis)Translations can not contain spaces '%s' s%s not defined in translations(	R/RUR9RRRCRVR(RW(RR(R/((R
tmodify¶scCs|ii|ƒ|iƒdS(N(RRCtpopR(RW(RR(((R
tdeleteÀscCsOtid|iƒ\}}|i|iƒƒ|iƒt	i
||iƒdS(NR(ttempfiletmkstempRR;R=tnewfilenametwriteROR@tostrename(RR=R^((R
RWÄs
(
RRRRIRORSRXRYR[RW(((R
R4ys			
	
	
	tsemanageRecordscBstZd„ZRS(NcCsÍtƒ|_t|iƒ|_|ip#t|iƒttdƒƒ‚nt|iƒ}|t
jo#t|iƒttdƒƒ‚nt|iƒ}|djo#t|iƒttdƒƒ‚ndS(Ns:SELinux policy is not managed or store cannot be accessed.sCannot read policy store.is'Could not establish semanage connection(tsemanage_handle_createRtshtsemanage_is_managedt	semanagedtsemanage_handle_destroyR9Rtsemanage_access_checkR.tSEMANAGE_CAN_READtsemanage_connect(RR.((R
RËs





(RRR(((R
RbÊstloginRecordscBsGtZd„Zd„Zddd„Zd„Zd„Zdd„ZRS(	NcCsti|ƒdS(N(RbRR(R((R
RÞsc	Cs2tdjo'|djo
d}q4t|ƒ}n|djo
d}nyyt|i|ƒ\}}|djot
tdƒ|ƒ‚nt|i|ƒ\}}|djot
tdƒ|ƒ‚n|ot
tdƒ|ƒ‚nyti|ƒWnt
td	ƒ|ƒ‚nXt|iƒ\}}|djot
td
ƒ|ƒ‚nt|i||ƒ}|djot
tdƒ|ƒ‚n|djo@t|i||ƒ}|djot
tdƒ|ƒ‚qãnt|i||ƒ}|djot
td
ƒ|ƒ‚nt|iƒ}|djot
tdƒƒ‚nt|i||ƒ}|djot
tdƒ|ƒ‚nt|iƒ}|djot
tdƒ|ƒ‚nWn7t
j
o+}tidd||d|ƒ|‚nXtidd||d|ƒt|ƒt|ƒdS(NiRts0tuser_uisCould not create a key for %ss2Could not check if login mapping for %s is defineds'Login mapping for %s is already definedsLinux User %s does not exists%Could not create login mapping for %ssCould not set name for %ssCould not set MLS range for %ss!Could not set SELinux user for %ss$Could not start semanage transactions"Could not add login mapping for %ssadd SELinux user mapping(R8RR3Rtsemanage_seuser_key_createRRdRR.RNR9Rtsemanage_seuser_existstexiststpwdtgetpwnamtsemanage_seuser_createtutsemanage_seuser_set_nametsemanage_seuser_set_mlsrangetsemanage_seuser_set_senametsemanage_begin_transactiontsemanage_seuser_modify_localtsemanage_committerrortmylogRtsemanage_seuser_key_freetsemanage_seuser_free(	RRRRRpR.RNRtR{((R
RXás^















Rc
Cs´d}d}y(|djo#|djottdƒƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt|i|ƒ\}}	|djottdƒ|ƒ‚nt|	ƒ}t|	ƒ}|djot|i|	t|ƒƒn|}|djot|i|	|ƒn|}t|iƒ}|djottdƒƒ‚nt|i||	ƒ}|djottd	ƒ|ƒ‚nt|iƒ}|djottd	ƒ|ƒ‚nWn@tj
o4}
tidd
||d||d|ƒ	|
‚nXtidd
||d||d|ƒ	t|ƒt|	ƒdS(NRsRequires seuser or serangeisCould not create a key for %ss2Could not check if login mapping for %s is defineds#Login mapping for %s is not definedsCould not query seuser for %ss$Could not start semanage transactions%Could not modify login mapping for %ssmodify selinux user mappingi(t	oldsenamet
oldserangeRRR9RRnRRdRR.RNRoRptsemanage_seuser_queryRttsemanage_seuser_get_mlsrangetsemanage_seuser_get_senameRvR3RwRxRyRzR{R|RR}R~(RRRRRpR€R.RRNRtR{((R
RYsN







%%
cCsöy¤t|i|ƒ\}}|djottdƒ|ƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt
|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt|iƒ}|djottdƒƒ‚nt|i|ƒ}|djottdƒ|ƒ‚nt
|iƒ}|djottdƒ|ƒ‚nWn.tj
o"}tidd|ƒ|‚nXtid	d|ƒt|ƒdS(
NisCould not create a key for %ss2Could not check if login mapping for %s is defineds#Login mapping for %s is not defineds<Login mapping for %s is defined in policy, cannot be deleteds$Could not start semanage transactions%Could not delete login mapping for %ssdelete SELinux user mappingi(RnRRdRR.RNR9RRoRptsemanage_seuser_exists_localRxtsemanage_seuser_del_localRzR{R|RR}(RRRpRNR{R.((R
R[Ss8





cCsh}t|iƒ\}|_|djottdƒƒ‚nx9|iD].}t	|ƒ}t|ƒt|ƒf||<qKW|S(NisCould not list login mappings(
RCtsemanage_seuser_listRRdR.tulistR9RRttsemanage_seuser_get_nameRRƒR‚(RRCRRtR.((R
RIzs

 icCsÀ|iƒ}|iƒ}|iƒtdjoQ|o
dd
GHnxv|D].}d|||dt||dƒfGHqJWn=|o
ddGHnx%|D]}d	|||dfGHq›WdS(Nis
%-25s %-25s %-25s
s
Login NamesSELinux Users
MLS/MCS Ranges%-25s %-25s %-25sis

%-25s %-25s
s%-25s %-25s(s
Login NamesSELinux Users
MLS/MCS Range(s
Login NamesSELinux User(	RRIRCRLRMR8RRRNR1(RRRRCRLRN((R
RS…s


0
(RRRRXRYR[RIRS(((R
RkÝs		>4	'	tseluserRecordscBsMtZd„Zd„Zgdddd„Zd„Zd„Zdd„ZRS(	NcCsti|ƒdS(N(RbRR(R((R
R•scCsðtdjoJ|djo
d}n
t|ƒ}|djo
d}qWt|ƒ}ndi|ƒ}	yt|i	|ƒ\}}
|djot
tdƒ|ƒ‚nt|i	|
ƒ\}}|djot
tdƒ|ƒ‚n|ot
tdƒ|ƒ‚nt|i	ƒ\}}|djot
td	ƒ|ƒ‚nt|i	||ƒ}|djot
td
ƒ|ƒ‚nxP|D]H}t|i	||ƒ}|djo t
tdƒ||fƒ‚q‡q‡Wtdjo|t|i	||ƒ}|djot
tdƒ|ƒ‚nt|i	||ƒ}|djot
td
ƒ|ƒ‚q\nt|i	||ƒ}|djo t
tdƒ||fƒ‚nt|i	|ƒ\}}|djot
tdƒ|ƒ‚nt|i	ƒ}|djot
tdƒƒ‚nt|i	|
|ƒ}|djot
tdƒ|ƒ‚nt|i	ƒ}|djot
tdƒ|ƒ‚nWn7t
j
o+}
t i!dd|||	|ƒ|
‚nXt i!dd|||	|ƒt"|
ƒt#|ƒdS(NiRRlRTisCould not create a key for %ss-Could not check if SELinux user %s is defineds"SELinux user %s is already defineds$Could not create SELinux user for %ssCould not set name for %ssCould not add role %s for %ssCould not set MLS range for %ssCould not set MLS level for %ssCould not add prefix %s for %ssCould not extract key for %ss$Could not start semanage transactionsCould not add SELinux user %ssadd SELinux user record($R8RR3tseleveltjointrolestserolestsemanage_user_key_createRRdRR.RNR9Rtsemanage_user_existsRptsemanage_user_createRttsemanage_user_set_nameR5tsemanage_user_add_roletsemanage_user_set_mlsrangetsemanage_user_set_mlsleveltsemanage_user_set_prefixtprefixtsemanage_user_key_extracttkeyRxtsemanage_user_modify_localRzR{R|Rtsemanage_user_key_freetsemanage_user_free(RRRŒRŠRR–RpR.R˜RRNR5RtR{((R
RX˜sp









$



 




Rc
Cs™d}ti|dƒ}y|djoft|ƒdjoS|djoF|djo9t	djot
tdƒƒ‚qŽt
tdƒƒ‚nt|i|ƒ\}}
|djot
tdƒ|ƒ‚nt|i|
ƒ\}}|djot
tdƒ|ƒ‚n|pt
td	ƒ|ƒ‚nt|i|
ƒ\}}|djot
td
ƒ|ƒ‚nt|ƒ}t|i|ƒ\}}	|djoti|	dƒ}n|d|}|djot|i|t|ƒƒn|djot|i|t|ƒƒn|djot|i||ƒnt|ƒdjo(x%|D]}
t|i||
ƒqSWnt |iƒ}|djot
tdƒƒ‚nt!|i|
|ƒ}|djot
tdƒ|ƒ‚nt"|iƒ}|djot
tdƒ|ƒ‚nWn@t
j
o4}t$i%dd
|d||d||ƒ	|‚nXt$i%dd
|d||d||ƒ	t&|
ƒt'|ƒdS(NRRTiis&Requires prefix, roles, level or rangesRequires prefix or rolessCould not create a key for %ss-Could not check if SELinux user %s is definedsSELinux user %s is not definedsCould not query user for %ss$Could not start semanage transactions Could not modify SELinux user %ssmodify SELinux user record((toldroleststringR‹RŒtnewrolesR–RERRŠR8R9RRŽRRdRR.RNRRptsemanage_user_queryRttsemanage_user_get_mlsrangeR€tsemanage_user_get_rolestrlistR“R3R”R•R5R’RxR™RzR{R|RRšR›(RRRŒRŠRR–RpR€R.R¢RNRžRœR5RtR{((R
RYás`:










%%
cCsöy¤t|i|ƒ\}}|djottdƒ|ƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt
|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt|iƒ}|djottdƒƒ‚nt|i|ƒ}|djottdƒ|ƒ‚nt
|iƒ}|djottdƒ|ƒ‚nWn.tj
o"}tidd|ƒ|‚nXtid	d|ƒt|ƒdS(
NisCould not create a key for %ss-Could not check if SELinux user %s is definedsSELinux user %s is not defineds7SELinux user %s is defined in policy, cannot be deleteds$Could not start semanage transactions Could not delete SELinux user %ssdelete SELinux user recordi(RŽRRdRR.RNR9RRRptsemanage_user_exists_localRxtsemanage_user_del_localRzR{R|RRš(RRRpRNR{R.((R
R[!s8





cCsäh}t|iƒ\}|_|djottdƒƒ‚nxœ|iD]‘}t	|ƒ}t|i|ƒ\}}|djottdƒ|ƒ‚nt
i|dƒ}t|ƒt|ƒt|ƒ|f|t	|ƒ<qKW|S(NisCould not list SELinux userss Could not list roles for user %sRT(RCtsemanage_user_listRRdR.R‡R9RRttsemanage_user_get_nameRR¡R¢RR‹RŒtsemanage_user_get_prefixtsemanage_user_get_mlslevelR (RRCR¢RRŒRtR.((R
RIEs


2icCså|iƒ}|iƒ}|iƒtdjov|oddGHddGHnx’|D]J}d|||d
t||dƒt||dƒ||dfGHqSWn=|o
ddGHnx%|D]}d|||dfGHqÀWdS(Nis
%-15s %-10s %-10s %-30sRtLabelingsMLS/s%-15s %-10s %-10s %-30s %s
sSELinux UsertPrefixs	MCS Levels	MCS Ranges
SELinux Roless%-15s %-10s %-10s %-30s %siiis	%-15s %s
s%-15s %s(RR©sMLS/sMLS/(sSELinux UserRªs	MCS Levels	MCS Ranges
SELinux Roles(sSELinux Users
SELinux Roles(	RRIRCRLRMR8RRRNR1(RRRRCRLRN((R
RSVs

	
L
(RRRRXRYR[RIRS(((R
R‰”s		I@	$	tportRecordscBsStZd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd	„Z	RS(
NcCsti|ƒdS(N(RbRR(R((R
Rgsc	Cs|djo
t}n*|djo
t}nttdƒƒ‚|djottdƒƒ‚n|idƒ}t	|ƒdjot
|dƒ}}n!t
|dƒ}t
|dƒ}t
|i|||ƒ\}}|djo ttd	ƒ||fƒ‚n||||fS(
NttcptudpsProtocol udp or tcp is requiredRsPort is requiredt-iis Could not create a key for %s/%s(tprototSEMANAGE_PROTO_TCPtproto_dtSEMANAGE_PROTO_UDPR9RtportRHtportsREtintthightlowtsemanage_port_key_createRRdR.RN(	RR³R¯R±R¶R·R.RNR´((R
t__genkeyjs 





 c
Cs¯tdjo'|djo
d}q4t|ƒ}n|djottdƒƒ‚n|i||ƒ\}
}}}t|i|
ƒ\}	}|	djo ttdƒ||fƒ‚n|o ttdƒ||fƒ‚nt|iƒ\}	}|	djo ttdƒ||fƒ‚nt||ƒt|||ƒt|iƒ\}	}|	djo ttd	ƒ||fƒ‚nt|i|d
ƒ}	|	djo ttdƒ||fƒ‚nt|i|dƒ}	|	djo ttd
ƒ||fƒ‚nt|i||ƒ}	|	djo ttdƒ||fƒ‚n|djoFt|i||ƒ}	|	djo ttdƒ||fƒ‚q›nt|i||ƒ}	|	djo ttdƒ||fƒ‚nt|iƒ}	|	djottdƒƒ‚nt|i|
|ƒ}	|	djo ttdƒ||fƒ‚nt|iƒ}	|	djo ttdƒ||fƒ‚nt |ƒt!|
ƒt"|ƒdS(NiRRlsType is requiredis(Could not check if port %s/%s is definedsPort %s/%s already definedsCould not create port for %s/%ss"Could not create context for %s/%stsystem_us,Could not set user in port context for %s/%stobject_rs,Could not set role in port context for %s/%ss,Could not set type in port context for %s/%ss2Could not set mls fields in port context for %s/%ss$Could not set port context for %s/%ss$Could not start semanage transactionsCould not add port %s/%s(#R8RR3ttypeR9RRt_portRecords__genkeyR³R¯RNR±R·R¶tsemanage_port_existsRdR.Rptsemanage_port_createtptsemanage_port_set_prototsemanage_port_set_rangetsemanage_context_createtcontsemanage_context_set_usertsemanage_context_set_roletsemanage_context_set_typetsemanage_context_set_mlstsemanage_port_set_conRxtsemanage_port_modify_localRztsemanage_context_freetsemanage_port_key_freetsemanage_port_free(
RR³R¯RR¼RpR±R¶R·R.RNRÀRÄ((R
RXs`




  
 

 
 
 
 

$
 

 
 

c
CsD|djoF|djo9tdjottdƒƒ‚qSttdƒƒ‚n|i||ƒ\}
}}}t
|i|
ƒ\}	}|	djo ttdƒ||fƒ‚n|p ttdƒ||fƒ‚nt|i|
ƒ\}	}|	djo ttdƒ||fƒ‚nt|ƒ}|djot|i|t|ƒƒn|djot|i||ƒnt|iƒ}	|	djottd	ƒƒ‚nt|i|
|ƒ}	|	djo ttd
ƒ||fƒ‚nt|iƒ}	|	djo ttd
ƒ||fƒ‚nt|
ƒt|ƒdS(NRisRequires setype or serangesRequires setypeis(Could not check if port %s/%s is definedsPort %s/%s is not definedsCould not query port %s/%ss$Could not start semanage transactionsCould not modify port %s/%s(RtsetypeR8R9RRR½R³R¯RNR±R·R¶R¾RdR.Rptsemanage_port_queryRÀtsemanage_port_get_conRÄRÈR3RÇRxRÊRzRÌRÍ(
RR³R¯RRÎRpR±R¶R·R.RNRÀRÄ((R
RYÂs:

  
 



 
 
c	Cs±|i||ƒ\}}}}t|i	|ƒ\}}|djo tt
dƒ||fƒ‚n|p tt
dƒ||fƒ‚nt|i	|ƒ\}}|djo tt
dƒ||fƒ‚n|p tt
dƒ||fƒ‚nt|i	ƒ}|djott
dƒƒ‚nt|i	|ƒ}|djo tt
dƒ||fƒ‚nt|i	ƒ}|djo tt
dƒ||fƒ‚nt|ƒdS(Nis(Could not check if port %s/%s is definedsPort %s/%s is not defineds2Port %s/%s is defined in policy, cannot be deleteds$Could not start semanage transactionsCould not delete port %s/%s(RR½R³R¯RNR±R·R¶R¾RdR.RpR9Rtsemanage_port_exists_localRxtsemanage_port_del_localRzRÌ(	RR³R¯RpR±RNR¶R·R.((R
R[ës*
  
  

 
 cCsÚh}t|iƒ\}|_|djottdƒƒ‚nx’|iD]‡}t	|ƒ}
t|
ƒ}|djoqKnt
|
ƒ}t|ƒ}t|ƒ}	t|ƒ}t|ƒ}||	|f|||f<qKW|S(NisCould not list portstreserved_port_t(RCtsemanage_port_listRRdR.tplistR9RR³RÐRÄtsemanage_context_get_typetctypetsemanage_context_get_mlstleveltsemanage_port_get_protoR¯tsemanage_port_get_proto_strt	proto_strtsemanage_port_get_lowR·tsemanage_port_get_highR¶(RRCR¶RÙR¯R×R³R·R.RÜRÄ((R
RIs"


c
Cs/h}t|iƒ\}|_|djottdƒƒ‚nxç|iD]Ü}t	|ƒ}	t|	ƒ}|djoqKnt
|ƒ}t|ƒ}t|ƒ}t|ƒ}||f|iƒjog|||f<n||jo|||fid|ƒqK|||fid||fƒqKW|S(NisCould not list portsRÓs%ds%d-%d(RCRÔRRdR.RÕR9RR³RÐRÄRÖR×RÚR¯RÛRÜRÝR·RÞR¶RLRG(
RRCR¶R¯R×R³R·R.RÜRÄ((R
tget_all_by_types(



%icCs—|o
dd
GHn|iƒ}|iƒ}|iƒxZ|D]R}d|}|d||d7}x$||dD]}|d	|7}qrW|GHq=WdS(Ns%-30s %-8s %s
sSELinux Port TypetProtosPort Numbers%-30s %-8s s%siis, %s(sSELinux Port TypeRàsPort Number(	RRRRßRCRLRMRFRJRÀ(RRRRCRÀRLRFRJ((R
RS1s


(
RRRR½RXRYR[RIRßRS(((R
R«fs			A	)			tinterfaceRecordscBsAtZd„Zd„Zd„Zd„Zd„Zdd„ZRS(NcCsti|ƒdS(N(RbRR(R((R
R?sc	CsÂtdjo'|djo
d}q4t|ƒ}n|djottdƒƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚n|ottdƒ|ƒ‚nt|iƒ\}}|djottd	ƒ|ƒ‚nt|i||ƒ}t|iƒ\}}|djottd
ƒ|ƒ‚nt|i|dƒ}|djottdƒ|ƒ‚nt|i|d
ƒ}|djottdƒ|ƒ‚nt|i||ƒ}|djottdƒ|ƒ‚n|djo@t|i||ƒ}|djottdƒ|ƒ‚q„nt|i||ƒ}|djottdƒ|ƒ‚nt|i||ƒ}|djottdƒ|ƒ‚nt|iƒ}|djottdƒƒ‚nt|i||ƒ}|djottdƒ|ƒ‚nt|iƒ}|djottdƒ|ƒ‚nt|ƒt|ƒt|ƒdS(NiRRlsSELinux Type is requiredisCould not create key for %ss*Could not check if interface %s is definedsInterface %s already defineds!Could not create interface for %ssCould not create context for %sRºs.Could not set user in interface context for %sR»s.Could not set role in interface context for %ss.Could not set type in interface context for %ss4Could not set mls fields in interface context for %ss&Could not set interface context for %ss$Could not set message context for %ss$Could not start semanage transactionsCould not add interface %s(R8RR3R×R9Rtsemanage_iface_key_createRRdt	interfaceR.RNtsemanage_iface_existsRptsemanage_iface_createtifacetsemanage_iface_set_nameRÃRÄRÅRÆRÇRÈtsemanage_iface_set_ifcontsemanage_iface_set_msgconRxtsemanage_iface_modify_localRzRËtsemanage_iface_key_freetsemanage_iface_free(	RRãRR×RpRæR.RNRÄ((R
RXBsh



















c	Cs$|djo#|djottdƒƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚nt
|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚nt|ƒ}|djot|i|t|ƒƒn|djot|i||ƒnt|iƒ}|djottdƒƒ‚nt|i||ƒ}|djottd	ƒ|ƒ‚nt|iƒ}|djottd	ƒ|ƒ‚nt|ƒt|ƒdS(
NRsRequires setype or serangeisCould not create key for %ss*Could not check if interface %s is definedsInterface %s is not definedsCould not query interface %ss$Could not start semanage transactionsCould not modify interface %s(RRÎR9RRâRRdRãR.RNRäRptsemanage_iface_queryRætsemanage_iface_get_ifconRÄRÈR3RÇRxRêRzRëRì(	RRãRRÎRpRæR.RNRÄ((R
RYˆs:








cCs®t|i|ƒ\}}|djottdƒ|ƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt
|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt|iƒ}|djottdƒƒ‚nt|i|ƒ}|djottdƒ|ƒ‚nt
|iƒ}|djottdƒ|ƒ‚nt|ƒdS(NisCould not create key for %ss*Could not check if interface %s is definedsInterface %s is not defineds4Interface %s is defined in policy, cannot be deleteds$Could not start semanage transactionsCould not delete interface %s(RâRRdRãR.RNR9RRäRptsemanage_iface_exists_localRxtsemanage_iface_del_localRzRë(RRãRpR.RN((R
R[°s.





cCs™h}t|iƒ\}|_|djottdƒƒ‚nxQ|iD]F}t	|ƒ}t|ƒt|ƒt
|ƒt|ƒf|t|ƒ<qKW|S(NisCould not list interfaces(RCtsemanage_iface_listRRdR.tilistR9RRãRîRÄtsemanage_context_get_usertsemanage_context_get_roleRÖRØtsemanage_iface_get_name(RRCR.RãRÄ((R
RIÏs

8ic	CsÕ|o
dd
GHn|iƒ}|iƒ}|iƒtoVx‘|D]G}d|||d||d||dt||dt	ƒfGHqDWn?x;|D]3}d	|||d||d||dfGHqšWdS(Ns	%-30s %s
sSELinux InterfacetContexts%-30s %s:%s:%s:%s iiiis%-30s %s:%s:%s (sSELinux InterfaceRö(
RRRRIRCRLRMR8RNR1tFalse(RRRRCRLRN((R
RSÛs

I(RRRRXRYR[RIRS(((R
Rá>s		F	(		tfcontextRecordscBsJtZd„Zdddd„Zd„Zd„Zd„Zdd	„ZRS(
NcCsti|ƒdS(N(RbRR(R((R
RésRRºcCsµ|djo
d}ntdjo'|djo
d}qKt|ƒ}n|djottdƒƒ‚nt|i	|t|ƒ\}}	|djottdƒ|ƒ‚nt|i	|	ƒ\}}|djottdƒ|ƒ‚n|ottd	ƒ|ƒ‚nt|i	ƒ\}}|djottd
ƒ|ƒ‚nt|i	||ƒ}t|i	ƒ\}}
|djottdƒ|ƒ‚nt|i	|
|ƒ}|djottdƒ|ƒ‚nt|i	|
d
ƒ}|djottdƒ|ƒ‚nt|i	|
|ƒ}|djottdƒ|ƒ‚n|djo@t|i	|
|ƒ}|djottdƒ|ƒ‚q¢nt|t|ƒt|i	||
ƒ}|djottdƒ|ƒ‚nt|i	ƒ}|djottdƒƒ‚nt|i	|	|ƒ}|djottdƒ|ƒ‚nt|i	ƒ}|djottdƒ|ƒ‚nt|
ƒt |	ƒt!|ƒdS(NRRºiRlsSELinux Type is requiredisCould not create key for %ss1Could not check if file context for %s is defineds#File context for %s already defineds$Could not create file context for %ssCould not create context for %ss)Could not set user in file context for %sR»s)Could not set role in file context for %ss)Could not set type in file context for %ss/Could not set mls fields in file context for %ss!Could not set file context for %ss$Could not start semanage transactions!Could not add file context for %s("tseuserR8RR3R¼R9Rtsemanage_fcontext_key_createRRdttargett
file_typestftypeR.RNtsemanage_fcontext_existsRptsemanage_fcontext_createtfcontexttsemanage_fcontext_set_exprRÃRÄRÅRÆRÇRÈtsemanage_fcontext_set_typetsemanage_fcontext_set_conRxtsemanage_fcontext_modify_localRzRËtsemanage_fcontext_key_freetsemanage_fcontext_free(RRûR¼RýRRùRpRR.RNRÄ((R
RXìsh




















cCs\|djo0|djo#|djottdƒƒ‚nt|i|t	|ƒ\}}	|djottdƒ|ƒ‚nt
|i|	ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt|i|	ƒ\}}|djottdƒ|ƒ‚nt|ƒ}
|djot|i|
t|ƒƒn|djot|i|
|ƒn|djot|i|
|ƒnt|iƒ}|djottdƒƒ‚nt|i|	|ƒ}|djottd	ƒ|ƒ‚nt|iƒ}|djottd	ƒ|ƒ‚nt|	ƒt|ƒdS(
NRs"Requires setype, serange or seuserisCould not create a key for %ss1Could not check if file context for %s is defineds"File context for %s is not defineds#Could not query file context for %ss$Could not start semanage transactions$Could not modify file context for %s(RRÎRùR9RRúRRdRûRüRýR.RNRþRptsemanage_fcontext_queryRtsemanage_fcontext_get_conRÄRÈR3RÅRÇRxRRzRR(RRûRÎRýRRùRpRR.RNRÄ((R
RY2s>'









cCsµt|i|t|ƒ\}}|djott	dƒ|ƒ‚nt
|i|ƒ\}}|djott	dƒ|ƒ‚n|ptt	dƒ|ƒ‚nt|i|ƒ\}}|djott	dƒ|ƒ‚n|ptt	dƒ|ƒ‚nt
|iƒ}|djott	dƒƒ‚nt|i|ƒ}|djott	dƒ|ƒ‚nt|iƒ}|djott	dƒ|ƒ‚nt|ƒdS(NisCould not create a key for %ss1Could not check if file context for %s is defineds"File context for %s is not defineds;File context for %s is defined in policy, cannot be deleteds$Could not start semanage transactions$Could not delete file context for %s(RúRRdRûRüRýR.RNR9RRþRptsemanage_fcontext_exists_localRxtsemanage_fcontext_del_localRzR(RRûRýRpRNR.((R
R[\s.





c	Cság}t|iƒ\}|_|djottdƒƒ‚nx™|iD]Ž}t	|ƒ}t|ƒ}t
|ƒ}t|ƒ}|o;|i||t|ƒt|ƒt|ƒt|ƒfƒqK|i|||fƒqKW|S(NisCould not list file contexts(tltsemanage_fcontext_listRRdR.tflistR9RRtsemanage_fcontext_get_exprtexprtsemanage_fcontext_get_typeRýtsemanage_fcontext_get_type_strt	ftype_strRRÄRGRóRôRÖRØ(RRRRRRýR.RÄ((R
RI{s

;ic
CsÖ|o
ddGHn|iƒ}x¯|D]§}t|ƒdjowto@d|d|d|d	|d|d
t|dtƒfGHqÎd|d|d|d	|d|d
fGHq'd
|d|dfGHq'WdS(Ns%-50s %-18s %s
sSELinux fcontextR¼Röis%-50s %-18s %s:%s:%s:%s iiiiis%-50s %-18s %s:%s:%s s%-50s %-18s <<None>>(sSELinux fcontextstypesContext(	RRRRIt	fcon_listtfconRER8R1R÷(RRRRR((R
RSs
@0(RRRRXRYR[RIRS(((R
Røès	F	*		tbooleanRecordscBs;tZd„Zdd„Zd„Zd„Zdd„ZRS(NcCsti|ƒdS(N(RbRR(R((R
R›sRcCsç|djottdƒƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚nt	|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚n|djot
|ƒ}t||ƒnt|iƒ}|djottdƒƒ‚nt|i||ƒ}|djottd	ƒ|ƒ‚nt|iƒ}|djottd	ƒ|ƒ‚nt|ƒt|ƒdS(
NRsRequires valueisCould not create a key for %ss(Could not check if boolean %s is definedsBoolean %s is not definedsCould not query file context %ss$Could not start semanage transactionsCould not modify boolean %s(tvalueR9Rtsemanage_bool_key_createRRdRR.RNtsemanage_bool_existsRptsemanage_bool_querytbRµtnvaluetsemanage_bool_set_valueRxtsemanage_bool_modify_localRztsemanage_bool_key_freetsemanage_bool_free(RRRRRpRR.RN((R
RYžs6








cCs®t|i|ƒ\}}|djottdƒ|ƒ‚nt|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt
|i|ƒ\}}|djottdƒ|ƒ‚n|pttdƒ|ƒ‚nt|iƒ}|djottdƒƒ‚nt|i|ƒ}|djottdƒ|ƒ‚nt
|iƒ}|djottdƒ|ƒ‚nt|ƒdS(NisCould not create a key for %ss(Could not check if boolean %s is definedsBoolean %s is not defineds2Boolean %s is defined in policy, cannot be deleteds$Could not start semanage transactionsCould not delete boolean %s(RRRdRR.RNR9RRRptsemanage_bool_exists_localRxR
RzR(RRRpRNR.((R
R[Ãs.





cCs{h}t|iƒ\}|_|djottdƒƒ‚nx3|iD](}t	|ƒ}t|ƒ}|||<qKW|S(NisCould not list booleans(
RCtsemanage_bool_listRRdR.tblistR9Rtbooleantsemanage_bool_get_nameRtsemanage_bool_get_valueR(RRCRRR#R.((R
RIâs

icCsk|o
ddGHn|iƒ}|iƒ}x8|D]0}||od|d||dfGHq3q3WdS(Ns%-50s %-18s
sSELinux booleanRs%-50s %-18s i(sSELinux booleansvalue(RRRRIRCRLRN(RRRRLRCRN((R
RSïs
(RRRRYR[RIRS(((R
Ršs
	%		
(%RqRR,R\R`R&Rtsemanagetrhpl.translateRtN_tis_selinux_mls_enabledR8RRütSEMANAGE_FCONTEXT_ALLtSEMANAGE_FCONTEXT_REGtSEMANAGE_FCONTEXT_DIRtSEMANAGE_FCONTEXT_CHARtSEMANAGE_FCONTEXT_BLOCKtSEMANAGE_FCONTEXT_SOCKtSEMANAGE_FCONTEXT_LINKtSEMANAGE_FCONTEXT_PIPERRR|R)R1R3R4RbRkR‰R«RáRøR(RáR,RRbR|R\R&R(RR1R3R8RR‰RkR4RRqR)RüRRRR«RøR`((R
t?sL?	















			Q·Òت²

Anon7 - 2021