Server : Apache System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 User : nobody ( 99) PHP Version : 8.1.23 Disable Function : NONE Directory : /lib/python2.7/site-packages/rpmUtils/ |
� �v_c @ s_ d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z d d l m Z d d l m Z d � Z e Z d � Z d � Z d d � Z d � Z d � Z d � Z d � Z d � Z d � Z d d g Z d e j f d � � YZ d d d � Z d d d � � YZ d e f d � � YZ d e f d � � YZ d d d � � YZ d S( i����N( t write32ut FNAME( t URLGrabError( t errorc C s t j | IJd S( N( t syst stderr( t numt msg( ( s5 /usr/lib/python2.7/site-packages/rpmUtils/oldUtils.pyt log s c C s | S( N( ( R ( ( s5 /usr/lib/python2.7/site-packages/rpmUtils/oldUtils.pyt _ s c C s� t | � } d } | j d k r* d } n- | | j � k sN | | j � k rW d } n | r t d t d � | | f � � n d S( 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)i i i����s1 Header cannot be opened or does not match %s, %s.N( t Header_Workt hdrt Nonet namet archR R ( t headerfileR R t ht fail( ( s5 /usr/lib/python2.7/site-packages/rpmUtils/oldUtils.pyt checkheader s $ "i c C s� t j d � t j | t j � } y t j | � Wn t j k rQ } d } n Xd } t j | � t j d � | r� | s� t d t d � | � � q� d Sn | Sd S( sd take a package, check it out by trying to open it, return 1 if it's good return 0 if it's nott md5i i t defaulti����s RPM %s fails md5 checkN( t tst sigCheckingt ost opent O_RDONLYt hdrFromFdnot rpmR t closeR R ( t packaget urlgraberrort fdnot et good( ( s5 /usr/lib/python2.7/site-packages/rpmUtils/oldUtils.pyt checkRpmMD5% s c C s� t j d � t j | t j � } y t j | � } Wnn t j k r� } t | � d k r` d St | � d k rv d St | � d k r� d St | � d k r� d Sn6 Xt | � \ } } | d k r� t j | � ~ d S~ t j | � d S( 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 signedR s public key not availaiablei s public key not availables public key not trustedi s error reading package headeri ie i i ( R R R R R R R R t strt getSigInfoR ( R R R R R t siginfo( ( s5 /usr/lib/python2.7/site-packages/rpmUtils/oldUtils.pyt checkSig; s* c C ss d } | j | � } | d k rB d } | j d � \ } } } n d } d } d } d } | | | f } | | f S( sE checks 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)i t ,ie t MD5R ( t sprintft split( R t stringR% R t sigtypet sigdatet sigidt infotuple( ( s5 /usr/lib/python2.7/site-packages/rpmUtils/oldUtils.pyR$ W s c C sX g } | t j } | d k r"