KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/root/usr/lib/python2.4/site-packages/rpmUtils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/lib/python2.4/site-packages/rpmUtils/oldUtils.pyc
mņ
üüPc@sGdkZdkZdkZdkZdkZdklZlZdklZdk	l
Zd„ZeZ
d„Zd„Zdd„Zd	„Zd
„Zd„Zd„Zd
„Zd„ZddgZdeifd„ƒYZddd„Zdfd„ƒYZdefd„ƒYZdefd„ƒYZdfd„ƒYZdS(N(swrite32usFNAME(sURLGrabError(serrorcCsti|IJdS(N(tsyststderrtmsg(tnumR((t5/usr/lib/python2.4/site-packages/rpmUtils/oldUtils.pytlogscCs|S(N(R(R((Rt_scCsŠt|ƒ}d}|idjo
d}n1||iƒjp||iƒjo
d}n|o#tdt	dƒ||fƒ‚ndS(sŽcheck a header by opening it and comparing the results to the name and arch
       we believe it to be for. if it fails raise URLGrabError(-1)iii’’’’s1Header cannot be opened or does not match %s, %s.N(
tHeader_Workt
headerfilethtfailthdrtNonetnametarchtURLGrabErrorR(RR
RR	R
((Rtcheckheaders
&
#icCsÆtidƒti|tiƒ}yti|ƒWnti	j
o}d}nXd}ti|ƒtidƒ|o,|ptdtdƒ|ƒ‚q«dSn|SdS(sctake a package, check it out by trying to open it, return 1 if its good
       return 0 if it's nottmd5iitdefaulti’’’’sRPM %s fails md5 checkN(ttstsigCheckingtostopentpackagetO_RDONLYtfdnothdrFromFdnotrpmterrortetgoodtcloseturlgraberrorRR(RR RRR((RtcheckRpmMD5%s


cCstidƒti|tiƒ}yti|ƒ}Wn„t	i
j
ou}t|ƒdjodSnt|ƒdjodSnt|ƒdjodSnt|ƒdjodSqön<Xt
|ƒ\}}|d	joti|ƒ~d
Sn~ti|ƒdS(
sÜ take a package, check it's sigs, return 0 if they are all fine, return 
    1 if the gpg key can't be found,  2 if the header is in someway damaged,
    3 if the key is not trusted, 4 if the pkg is not gpg or pgp signedRspublic key not availaiableispublic key not availablespublic key not trustediserror reading package headeriieiiN(RRRRRRRRRRRRtstrt
getSigInfotsiginfoR(RR$RRRR((RtcheckSig;s,




cCsud}|i|ƒ}|djo"d}|idƒ\}}}nd}d}d}d}|||f}||fS(	sEchecks if a computerhand back signature information and an error codesŽ%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|s(none)it,ietMD5RN(
tstringRtsprintfR$Rtsplittsigtypetsigdatetsigidt	infotuple(RR$R-R.R+R,RR(((RR#Ws
cCs\g}|ti}|djon5t|ƒtijo|i	|ƒn|i
|ƒ|S(N(t	provnamestheaderRtRPMTAG_PROVIDENAMEtprovidesRttypettypestListTypetextendtappend(R0R2R/((RtgetProvidesgs


c

Cs½|\}}}|\}}}d„}||ƒ}||ƒ}||ƒ}||ƒ}||ƒ}||ƒ}ti|||f|||fƒ}	t
dd|||||||	fƒ|	S(NcCs7t|ƒtijo|djot|ƒ}n|S(N(R3targR4t
StringTypeRR"(R9((RtrpmOutToStrvs#is%s, %s, %s vs %s, %s, %s = %s(te1tv1tr1te2tv2tr2R;RtlabelComparetrcR(
t.0t.2R<R=R>R?R@RAR;RC((Rt
compareEVRrs	$&cCs›|o|titiBtiB@o|d}n|ti@o|d}n|ti@o|d}n|ti@o|d}|d|}q—n|S(Nt t<t>t=s %s(tflagsRt
RPMSENSE_LESStRPMSENSE_GREATERtRPMSENSE_EQUALR
tversion(R
RORK((Rt
formatRequire…s
cCsHytitiƒ}Wn+tij
o}tdtdƒƒnX|S(NisFCould not open RPM database for reading. Perhaps it is already in use?(	RtTransactionSettconftinstallroottdbRRterrorlogR(RRT((Rt	openrpmdb“s
tGzipFileRcBstZd„ZRS(NcCs³|iidƒ|iidƒ|id }d}|o
t}n|iit|ƒƒt|it	dƒƒ|iidƒ|iidƒ|o|ii|dƒndS(Ns‹siż’’’iss’t(
tselftfileobjtwritetfilenametfnameRKtFNAMEtchrtwrite32utlong(RYR]RK((Rt_write_gzip_headerŸs

(t__name__t
__module__Rb(((RRWžstrbi	cCst|||ƒS(N(RWR\tmodet
compresslevel(R\RfRg((Rt	_gzipOpen®st
RPM_Base_WorkcBsktZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„Zd„ZRS(NcCs
d|_dS(N(RRYR(RY((Rt__init__²scCs?|idjo$tdtdƒƒtidƒn|i|S(Nis-Got an empty Header, something has gone wrongi(RYRRRURRtexitttag(RYRl((Rt_getTagµscCs&|idƒdjodSndSdS(Nt
sourcepackageii(RYRm(RY((RtisSource¼scCs
|idƒS(NR
(RYRm(RY((RR
ĀscCs
|idƒS(NR(RYRm(RY((RRÅscCs
|idƒS(Ntepoch(RYRm(RY((RRpČscCs
|idƒS(NRO(RYRm(RY((RROĖscCs
|idƒS(Ntrelease(RYRm(RY((RRqĪscCs:|idƒ}|idƒ}|idƒ}|||fS(NRpRORq(RYRmRtvtr(RYRsRRr((RtevrŃscCs^|idƒ}|idƒ}|idƒ}|idƒ}|idƒ}|||||fS(NR
RpRORqR(RYRmtnRRrRsta(RYRvRRuRsRr((Rtnevra×sc
CsČ|iƒ\}	}}}}|djo
d}n|iƒod||	|||f}nd||	||||f}|ot|dƒ}nt|dƒ}|i|iidƒƒ|iƒ|S(Nt0s%s/%s-%s-%s-%s.src.hdrs%s/%s-%s-%s-%s.%s.hdrtwi(RYRwR
RptvertrelRRRot	headerdirtheaderfntcompressRht	headeroutRR[RtunloadR(
RYR|R~RzRR}RpR{RR
((RtwriteHeaderßs



(
RcRdRjRmRoR
RRpRORqRtRwR(((RRi±s										RcBstZdZd„ZRS(s‡for operating on hdrs in and out of the rpmdb
       if the first arg is a string then it's a filename
       otherwise it's an rpm hdrcCsxt|ƒtijoOygti|dƒ}yti|i	ƒƒ}Wn5tij
o&}t
dtdƒ|ƒd}nXWn×tj
oi}t|dƒ}yti|i	ƒƒ}WqWtij
o&}t
dtdƒ|ƒd}qWXndtj
o&}t
dtdƒ|ƒd}n3tj
o&}t
dtdƒ|ƒd}nX|iƒn|}||_dS(NRsisDamaged Header %s(R3R0R4R:tgzipRtfdRt
headerLoadtreadR	RRRURRtIOErrort
ValueErrort	zlibErrorRRYR(RYR0RR	Rƒ((RRjös0
(RcRdt__doc__Rj(((RRņstRPM_WorkcBstZd„ZRS(NcCsŽtitiƒti|tiƒ}yti	|ƒ|_Wn>tij
o/}tdtdƒ||fƒd|_nXti|ƒdS(NisError opening rpm %s - error %s(Rt
setVSFlagsRt_RPMVSF_NOSIGNATURESRRtrpmfnRRƒRRYRRRRURRR(RYRRRƒ((RRjs(RcRdRj(((RRŠstRpm_Ts_WorkcBs>tZdZdd„Zd„Zeeed„Zd„ZRS(sļThis should operate on groups of headers/matches/etc in the rpmdb - ideally it will 
    operate with a list of the Base objects above, so I can refer to any one object there
    not sure the best way to do this yet, more thinking involvedt/cCs‡y/tio!tidjo
ti}q.nWntj
o	}nXti|ƒ|_dddddddd	d
ddg|_	dS(
NRt
addInstalltaddErasetruntchecktorderRtcloseDBtdbMatchtsetFlagsR‹t
setProbFilter(
RRRStdbPatht	NameErrorRRRQRYRtmethods(RYR™R((RRj!s
cCs1||ijot|i|ƒSn
t|‚dS(N(t	attributeRYR›tgetattrRtAttributeError(RYRœ((Rt__getattr__.scCs[g}|djo-|djo |djo|iiƒ}nī|djo|ii||ƒ}nČ|djo)|iiƒ}|i	|t
i|ƒn’|djo)|iiƒ}|i	|t
i|ƒn\|djo)|iiƒ}|i	|t
i
|ƒn&|iiƒ}|i	|t
i|ƒx'|D]}t|ƒ}|i|ƒq4W|S(s(hands back a list of Header_Work objectstglobtregextstrcmpN(thwlisttmireRRltsearchRYRR–thdrlisttpatternRtRPMMIRE_GLOBt
RPMMIRE_REGEXtRPMMIRE_STRCMPtRPMMIRE_DEFAULTRRthdrobjR7(RYRlR„R¤RR¦R£R¬((Rtmatch4s,'



cCs‚|djo|iititiBƒnS|djo|iitiƒn.|djo|iitiƒn
t	|‚dS(sApass type of check you want to occur, default is to have them offRtnoneRN(
tsigRYRR‹RtRPMVSF_NOMD5tRPMVSF_NEEDPAYLOADRŒtRPMVSF_DEFAULTRž(RYRÆ((RRSs


(RcRdR‰RjRŸRR­R(((RRŽs

	(RR4RR‚RR`R^turlgrabber.grabberRtzlibRRˆRRURRR!R%R#R8RFRPRVt__all__RWRhRiRRŠRŽ(RFR%R4R8RRR`RRµR!RŠRRRPRiRRhR^RˆRRVRURŽR‚R#RRW((Rt?s2					

										A 

Anon7 - 2021