/opt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/__pycache__
NameSizeModeActions
cli.cpython-311.opt-1.pyc52930644editdlrm
cli.cpython-311.pyc52930644editdlrm
const.cpython-311.opt-1.pyc9320644editdlrm
const.cpython-311.pyc9320644editdlrm
domain.cpython-311.opt-1.pyc357880644editdlrm
domain.cpython-311.pyc357880644editdlrm
exceptions.cpython-311.opt-1.pyc9080644editdlrm
exceptions.cpython-311.pyc9080644editdlrm
fs.cpython-311.opt-1.pyc20010644editdlrm
fs.cpython-311.pyc20010644editdlrm
io.cpython-311.opt-1.pyc80810644editdlrm
io.cpython-311.pyc80810644editdlrm
__init__.cpython-311.opt-1.pyc1810644editdlrm
__init__.cpython-311.pyc1810644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/__pycache__/io.cpython-311.pyc (8081B)
§ %Ó»;!8Õ*ãóÆ—ddlZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ej e ¦«Zd d„Zejd„¦«Zd„Zd„Zdd „Zd „Zd „ZdS)éN)Ú clcaptain)ÚExternalProgramFailedTcó$— t|d¦«5}| ¦«cddd¦«S#1swxYwYdS#ttf$r>t jd|ztjd¦«|s‚tjd¦«YdSwxYw)zÅ Helper for read file, process errors and make backup before read :param: filename `str` name of file for read :param: exit_on_error `bool` use sys.exit on error or raise exception ÚrNzError: failed to read é) ÚopenÚ readlinesÚOSErrorÚIOErrorÚsecureioÚloggingÚ SILENT_FLAGÚsysÚexit)ÚfilenameÚ exit_on_errorÚ_files úBopt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/io.pyÚ read_filersä€ð Ý �(˜CÑ Ô ð % EØ—?’?Ñ$Ô$ð %ð %ð %ð %ñ %ô %ð %ð %ð %ð %ð %ð %øøøð %ð %ð %ð %ð %ð %øõ •WÐ ðððÝÔÐ1°HÑ<½hÔ>RÐTUÑVÔVÐVØð Ø Ý Œ�‰ Œ ˆ ˆ ˆ ˆ ð øøøs-‚A’3¦ A³7·Aº7»AÁA BÂBcó —t|¦«S©N)r)Úpaths rÚread_file_cachedr&s€å �T‰?Œ?Ðócóz—tj|||||tj¬¦«}tj|¦«|duS)N)Úlogger)r Úcreate_dir_securer Úclosefd)rÚpermÚuidÚgidÚ parent_pathÚfds rÚ make_userdirr$,sF€å Ô #Ø ˆd�C˜˜kµ(Ô2Bð ñ ô €Bõ Ô�RÑÔÐØ �ˆ:ÐrcóB— tj|¦«j}n#t$rYdSwxYw||krdS t j|¦«}n#t $rYdSwxYwtj |j ¦«tj |¦«kS)aÏ CLOS-4545 guard against stealing a shared home's ``.cagefs``. Return ``True`` when ``home_path`` is owned by a user *other than* ``target_uid`` and that owner is a real ``/etc/passwd`` user whose home directory is ``home_path`` itself. On every panel CageFS supports, the home directory is owned by the real subscription/account user, so its owner is the authoritative answer to "who does this home belong to". When several ``/etc/passwd`` entries share one home -- e.g. an orphan ``sys_user`` left behind by a reverted Plesk migration, which merely has the home as its ``pw_dir`` but does not own it -- an operation aimed at a uid that is *not* the home owner must not chown ``/.cagefs`` to it: that would strip the real owner of its own ``.cagefs`` and break the subscription (the next HTTP request fails with 503). Callers must skip the chown when this returns ``True``. Keying on the home owner (rather than the current ``.cagefs`` owner) means the legitimate owner -- and automated repair such as ``update_status(fix_owner=True)`` -- can always (re)claim ``.cagefs``, even after it was previously flipped to an orphan. ``False`` is also returned when ``target_uid`` owns the home, when the home cannot be stat'd, or when it is owned by an unrelated uid (e.g. root) that does not live in this home, so normal provisioning, brand-new subscriptions and ownership repair keep working. F) ÚosÚstatÚst_uidr ÚpwdÚgetpwuidÚKeyErrorrÚrealpathÚpw_dir)Ú home_pathÚ target_uidÚhome_uidÚ home_owners rÚhome_owned_by_other_userr25s·€ð6Ý”7˜9Ñ%Ô%Ô,ˆˆøÝ ððð؈uˆuðøøøà�:ÒÐðˆuðÝ”\ (Ñ+Ô+ˆ ˆ øÝ ððð؈uˆuðøøøõ Œ7× Ò ˜JÔ-Ñ .Ô .µ"´'×2BÒ2BÀ9Ñ2MÔ2MÒ MÐMs‚œ *©*¶A Á AÁAFc ó®—|s tj |¦«�s2 tj|¦«nj#t$r]}|jt jkrt d|›d�¦«nt  d|›�|¬¦«Yd}~nd}~wwxYw tj ||¦«n›#ttf$r‡}d|›d|›dt|¦« dd ¦«›�}t  ||¬¦«|rtj||d ¦«nt#|t$j¬ ¦«Yd}~d Sd}~wwxYwd S) NzSymlink z does not existz Error: Unable to remove symlink )Úexc_infoz Error: failed to create symlink z to z : ÚErrnozErr codeT)ÚfileF)r&rÚislinkÚunlinkr ÚerrnoÚENOENTrÚinfoÚerrorrÚsymlinkrÚstrÚreplacer r ÚprintrÚstderr)Ú dest_pathÚ link_nameÚ write_logÚforceÚsilentÚeÚmsgs rÚswitch_symlinkrIasˆ€Ø ð•B”G—N’N 9Ñ-Ô-ñð YÝ ŒI�iÑ Ô Ð Ð øÝð Yð Yð YØŒw�%œ,Ò&Ð&Ý— ’ ÐA yÐAÐAÐAÑBÔBÐBÐBå— ’ ÐKÀ ÐKÐKÐVW� ÑXÔXÐXøøøøøøøøøð  Yøøøð Ý Ô ˜i¨Ñ 3Ô 3Ð 3Ð 3øÝÕ.Ð/ð ð ð Øw°YÐwÐwÀIÐwÐwÕRUÐVWÑRXÔRX×R`ÒR`ÐahÐjtÑRuÔRuÐwÐwˆCÝ �LŠL˜ qˆLÑ )Ô )Ð )Øð ,ÝÔ   f¨dÑ3Ô3Ð3Ð3å�c¥¤ Ð+Ñ+Ô+Ð+Ø�4�4�4�4�4øøøøð øøøð ˆ5s/¤9¹ B ÁABÂB Â$B:Â:Eà AÁ2 C+Á>BÂC+ÂBÂC+ÃCà C$Ã#C$Ã+"D5ÄD#Ä"D5Ä# D0Ä-D5Ä/D0Ä0D5có*—tj|tjtjztjz¦«} tj||¦«tj|||¦«tj|¦«dS#tj|¦«wxYwr)r&rÚO_RDONLYÚ O_NOFOLLOWÚ O_CLOEXECÚfchmodÚfchownÚclose)rÚmoder r!r#s rÚapply_metadata_nofollowrdˆss€õ Œ�•r”{¥R¤]Ñ2µR´\ÑAÑ BÔ B€BðÝ Œ �"�dÑÔÐÝ Œ �"�c˜3ÑÔÐå Œ�‰ Œ ˆ ˆ ˆ ø�Œ�‰ Œ ˆ ˆ øøøs »+A<Á<B)T)TTF)r9Ú functoolsr r&r)rrNr ÚclcommonrÚclcommon.utilsrÚ getLoggerÚ__name__rrÚcacherr$r2rIr[rd©rrúrlsðð  € € € ØÐÐÐØ€€€Ø € € € Ø € € € Ø € € € Ø€€€à€€€ØÐÐÐÐÐØ0Ð0Ð0Ð0Ð0Ð0ð ˆÔ ˜8Ñ $Ô $€ððððð" „ððñ„ðð ððð)Nð)Nð)NðXðððð,ððð" ð ð ð ð r