ó b=0Yc@sßddlZddlTejdƒZejdƒZeZeZde fd„ƒYZ e e ƒZ ej Z eeege _ee _ejZeege_ee_ejZege_ee_ejZege_e e_ejZege_de_ejZege_ee_ejZeege_ee_egej_dej_ejZege_ee_ejZeeege_ee_eeeegej_eej_eeeeegej_eej_eeeeeegej_eej_eeeeegej _eej _ej!Z!eege!_ee!_ej"Z"eege"_ee"_d„Z#d„Zddd „Zddd „Zddd „Zdd „Z e$d „Z%d„Z&dS(iÿÿÿÿN(t*s libc.so.6s liblve.so.0tDIRENTRYcBs?eZdefdefdefdefdedfgZRS(td_inotd_offtd_reclentd_typetd_namei(t__name__t __module__tino_ttoff_ttc_ushorttc_ubytetc_chart_fields_(((s,/usr/lib/python2.7/site-packages/secureio.pyR.s     cCs”tj|ƒ}t|ƒ}|s0tdƒ‚nt|ƒg}x9tr{t|ƒ}|s_Pn|j}|j|j ƒqCWt|ƒt |ƒ|S(Nsfdopendir error( tostdupt fdopendirt Exceptiont rewinddirtTruetreaddirtcontentstappendRtclosedir(tfdtfd2tdirptdirlisttentryptentry((s,/usr/lib/python2.7/site-packages/secureio.pytflistdir¨s       cCs8|dk r4ytj|ƒWq4tk r0q4XndS(N(tNoneRtclosetOSError(R((s,/usr/lib/python2.7/site-packages/secureio.pytclosefdÄs   cCsd|dkrd}ntj||||ƒ}|dkr=|S|dk r`|d|ttƒndS(Niÿÿÿÿis.Error: failed to set permissions of directory (R tliblvetset_perm_dir_securetFalseR(tpathtpermt parent_pathRtlogger((s,/usr/lib/python2.7/site-packages/secureio.pyR%Ðs    cCsg|dkrd}ntj|||||ƒ}|dkr@|S|dk rc|d|ttƒndS(Niÿÿÿÿis(Error: failed to set owner of directory (R R$tset_owner_dir_secureR&R(R'tuidtgidR)RR*((s,/usr/lib/python2.7/site-packages/secureio.pyR+ßs    cCsj|dkrd}ntj||||||ƒ}|dkrC|S|dk rf|d|ttƒndS(Niÿÿÿÿis"Error: failed to create directory (R R$tcreate_dir_secureR&R(R'R(R,R-R)RR*((s,/usr/lib/python2.7/site-packages/secureio.pyR.îs    cCsBtj|||||ƒ}|r>|r>|d|ttƒn|S(Ns"Error: failed to create directory (R$tmakedirs_secureR&R(R'R(R,R-R)R*tres((s,/usr/lib/python2.7/site-packages/secureio.pyR/ýs cCs|rtjƒStjƒSdS(s’ Set CAP_SYS_RESOURCE capability :param bool clear: Set on if it's true, set off otherwise :return: 0 for success, -1 otherwise :rtype: int N(R$tdisable_quota_capabilitytenable_quota_capability(tclear((s,/usr/lib/python2.7/site-packages/secureio.pytset_capabilitys cCstj|ƒtƒS(sý Change effective uid of current process and set CAP_SYS_RESOURCE capbality to prevent "Disk quota exceeded" error :param int euid: User ID to set it as current effective UID :return: 0 if capability was set successfuly, -1 otherwise :rtype: int (RtsetuidR4(R,((s,/usr/lib/python2.7/site-packages/secureio.pyt change_uids ('Rtctypestcdllt LoadLibrarytlibcR$tc_longR R t StructureRtPOINTERt DIRENTRY_Ptfchowntc_inttargtypestrestypetfchmodRtc_void_pRRR Rtopen_not_symlinktc_char_pR#t check_dirtisdirR%R+R.R/tget_path_from_descriptort is_subdirRR&R4R6(((s,/usr/lib/python2.7/site-packages/secureio.pyt#st