ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/clselect/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/clselect/__pycache__/clpassenger.cpython-311.pyc

�

E��f9i���ddlmZddlmZddlmZddlZddlZddlZddlmZddlm	Z	ddl
mZddl
Z
ddlZddlZddlZddlZddlmZmZdd	lmZdd
lmZddlmZmZddlmZdd
lmZmZmZm Z m!Z!m"Z"m#Z#ddl$m%Z%m&Z&ddl'm(Z(m)Z)ddl*m+Z+m,Z,ddl-m.Z.ddlm/Z/m0Z0m1Z1ddlm2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7ej8e9��Z:e:�;ej<��ej=e>dd����Z?e:�@e?��dZAdZBdZCdZDdZEdZFdZGdZHd ZId!�ZJd"�ZKd#�ZLd$�ZMd%�ZNd&�ZOd'�ZPd(�ZQd)�ZRd*�ZSd+�ZTd,�ZUd-�ZVd.�ZWd/�ZXd0ddeHdfd1�ZYd2�ZZdAd3�Z[d4�Z\eHfd5�Z]d6�Z^d7�Z_dBd8�Z`d9�Zad:�ZbdBd;�Zcd<�Zdd=�Zed>�Zfd?�Zgd@�ZhdS)C�)�absolute_import)�print_function)�divisionN)�datetime)�	iteritems)�configparser)�	clcaptain�utils)�userdomains)�*get_file_system_in_which_file_is_stored_on)�get_file_lines�write_file_lines)�mod_makedirs)�QuotaWrapper�NoSuchUserException�InsufficientPrivilegesException�IncorrectLimitFormatException�GeneralException�NoSuchPackageException�QuotaDisabledException)�PyLve�
PyLveError)�
set_user_perm�
set_root_perm)�Dict�Union�)�ClSelectExcept)�file_readlines�
file_write�s_partition)�get_abs_rel�mkdir_p�	file_read�file_writelines)�get_using_realpath_keys�realpaths_are_equalz	/dev/null�wz9# DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION BEGINz7# DO NOT REMOVE. CLOUDLINUX PASSENGER CONFIGURATION ENDz	config.ruz�app = proc do |env|
    message = "It works!\n"
    version = "Ruby %s\n" % RUBY_VERSION
    response = [message, version].join("\n")
    [200, {"Content-Type" => "text/plain"}, [response]]
end


run app
ztmp/restart.txtzpassenger_wsgi.pyaMimport os
import sys


sys.path.insert(0, os.path.dirname(__file__))


def application(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain')])
    message = 'It works!\n'
    version = 'Python %s\n' % sys.version.split()[0]
    response = '\n'.join([message, version])
    return [response.encode()]
zapp.jsaCvar http = require('http');
var server = http.createServer(function(req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    var message = 'It works!\n',
        version = 'NodeJS ' + process.versions.node + '\n',
        response = [message, version].join('\n');
    res.end(response);
});
server.listen();
c�f�tj|��}t|j|jd���dS)NF��exit)�pwd�getpwnamr�pw_uid�pw_gid��user�userpwds  �K/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/clpassenger.py�drop_root_permr4^s0���l�4� � �G��'�.�'�.��?�?�?�?�?�?�c��	t||d���}tj|���tj��|S#t
$rYdSwxYw)N�surrogateescape��errors)�open�fcntl�flock�fileno�LOCK_EX�IOError)�config_path�mode�	conf_files   r3�get_config_lockrCcsd�����d�3D�E�E�E�	�
��I�$�$�&�&��
�6�6�6���������t�t����s�AA�
A�Ac�@�	|���dS#YdSxYw�N)�close)�	lock_files r3�release_lockrHls-��
����������
������s��c���d}tj��dkstj��dkrt|��d}d}	t	|��t|d��}t
j��}|�|��tj||�
����ng#tttjtjf$r=}t#jt"jd�||����Yd}~nd}~wwxYwt)|��|rt+d���dSdS#t)|��|rt+d���wwxYw)zS
    Write config with locking.
    Drop permissions if method called as root.
    FrTN�rzCan't write {}: {}r*)�os�getegid�geteuidr4�check_and_createdirrC�io�StringIO�writer	�getvaluer?�OSErrorr�UnableToSaveDatar
�ExternalProgramFailed�syslog�LOG_WARNING�formatrHr)r1r@�config�permissions_dropped�config_file�file_content�es       r3�write_configr^ss���
 ��

�z�|�|�q���B�J�L�L�A�-�-��t����"���K�&��K�(�(�(�%�k�3�7�7���{�}�}�����\�"�"�"����\�%:�%:�%<�%<�=�=�=�=��
�W�n�=�u�?Z�[�C�C�C��
�f�(�*�1�1�+�q�A�A�	C�	C�	C�	C�	C�	C�	C�	C�����C����	�[�!�!�!��	&��u�%�%�%�%�%�%�	&�	&��	�[�!�!�!��	&��u�%�%�%�%�%�	&���s1�A.B4�3E�4'D�3D�E�D�E�$E$c�,�tj�|��}tj�|��sU	t	j|��dS#ttjtjf$r}tj
||���d}~wwxYwdSrE)rK�path�dirname�isdirr	�mkdirrSrrUr
rT)r`�user_backup_pathr]s   r3rNrN�s����w���t�,�,��
�7�=�=�)�*�*�G�	G��O�,�-�-�-�-�-����=�u�?Z�[�	G�	G�	G� �1�2B�A�F�F�F�����	G����G�Gs�A�!B�7B�Bc�v�tj|��}tj�|jdd��S)Nz.cl.selector�htaccess_cache)r,r-rKr`�join�pw_dirr0s  r3�get_htaccess_cache_pathri�s,���l�4� � �G�
�7�<�<����8H�I�I�Ir5c�|�d}d}i}tj�|���r�	tj|��}|j|d<|j|d<|j|d<t|j��|d<tj
|j���|��|d<tj
|j
���|��|d<|dd	kr|S	t|d
��5}|�|��|d<|�|d��|�|��|d
<ddd��n#1swxYwYn,#t"t$f$r}d|�d|�d|��|d<Yd}~nd}~wwxYwt'|��d|d<n)#t"t$f$r}d|�d|��|d<Yd}~nd}~wwxYw|S)zp
    Get info (stat, first n symbols and file system in which file is stored)
    about htaccess_cache file
    z%Y-%m-%d %H:%M:%S�d�	file_size�gid�uid�permissions�last_access�last_modificationrrJ�
first_symbols��last_symbolsNzWe cannot get first and last z symbols from "z" file. Exception: �error�details�file_systemzWe cannot get info about ")rKr`�exists�stat�st_size�st_gid�st_uid�oct�st_moder�
fromtimestamp�st_atime�strftime�st_mtimer:�read�seekrSr?r)�path_to_file�time_format�number_of_symbols�	file_info�	file_stat�f�errs       r3�#_get_info_about_htaccess_cache_filer��so��&�K����I�	�w�~�~�l�#�#��	����-�-�I�%.�%6�I�k�"�(�/�I�e��(�/�I�e��'*�9�+<�'=�'=�I�m�$�'/�'=�i�>P�'Q�'Q�'Z�'Z�[f�'g�'g�I�m�$�-5�-C�I�DV�-W�-W�-`�-`�al�-m�-m�I�)�*���%��*�*� � �
��,��,�,�J��12���8I�1J�1J�I�o�.��F�F�-�-�q�1�1�1�01���7H�0I�0I�I�n�-�	J�J�J�J�J�J�J�J�J�J�J����J�J�J�J���
�W�%�
�
�
�
�%�%�%� �L�L��C�&�	�'�"�"�"�"�"�"�����
����(R�R^�'_�'_�`i�'j�I�m�$�$����!�	�	�	�	������"�I�g�����������	�����sg�B4F�E�.AE�6E�E�E�	E�
E�
F�E7�E2�-F�2E7�7F�F9�$F4�4F9c�t�t��}	t��}|���|�|��}|j|jz|d<|j|d<|j|d<|j|d<|j	|d<|j
|d<|j|d<n"#t$r}d|�d	|��|d
<Yd}~nd}~wwxYw|S)zB
    Getting user lve limits for logging those for next debug
    �cpu�pmem�vmemrO�iops�ep�nprocz,We cannot get lve limits for user with uid "�". Exception: ruN)
�dictr�
initialize�lve_info�ls_cpu�
ls_cpu_weight�
ls_memory_phy�	ls_memory�ls_io�ls_iops�	ls_enters�ls_nprocr)�user_uid�result�py_lve�user_limitsr�s     r3�_get_user_lve_limitsr��s����V�V�F�
������������o�o�h�/�/��#�*�[�-F�F��u�
�$�2��v��$�.��v��"�(��t��$�,��v��"�,��t��%�.��w�����
�
�
�
������
��w�����������
����
�Ms�BB�
B5� B0�0B5c
�4�t��}t|��}	t��}|�|��|}|}nM#tt
ttttttf$r}d|�d|��|d<Yd}~nd}~wwxYw|S)zD
    Getting user quota limits for logging those for next debug
    z.We cannot get quota limits for user with uid "r�ruN)r��strr�get_user_limitsrrrrrrr?rS)r�r��
quota_wrapper�user_quotasr�s     r3�_get_user_quota_limitsr��s����V�V�F��8�}�}�H�
�$���
�#�3�3�H�=�=�h�G�������"�+��)�"���	�

�

�

�

�
�H�H��C�
��w�����������

�����Ms�+A�5B�B�Bc�H�t|��}t��}||d<t��|d<	tj|��j}n*#t
$r}d|�d|��|dd<d}Yd}~nd}~wwxYw|��t��|dd<|dd�t|����t��|dd<|dd�t|����t�
|d	|�
��dS)zy
    Logging info (lve & quota limits) about user and
    info (stat info, first & last n symbols) about config file
    �config_file_info�	user_infozUser "z" does not exists. Exception: ruN�
lve_limits�quota_limitsT)�exc_info�extra)r�r�r,r-r.�KeyError�updater�r��logger�	exception)r1r@rur��
debug_infor�r�s       r3�*_log_debug_info_about_user_and_config_filer�s;��4�K�@�@�I����J�%.�J�!�"�"�f�f�J�{����<��%�%�,����������D�D��C�,
�
�;���(������������������04���
�;���-��;���-�4�4�5I�(�5S�5S�T�T�T�26�&�&�
�;���/��;���/�6�6�7M�h�7W�7W�X�X�X�
���U�T���<�<�<�<�<s�A�
A6�A1�1A6c�.�tjd���}t|��}t|d��}|��	|�|��n�#t
tf$r}t|||��Yd}~nzd}~wtjtj	f$rYt|��tjtjd�
|����tjd���}YnwxYwt|��n#t|��wxYw||fS)NF)�strictrJzConfig {} is broken.)�ConfigParser�RawConfigParserrirC�readfpr?rSr��ParsingError�MissingSectionHeaderError�_unlinkrVrWrXrH)r1rYr@r[r�s     r3�read_configr�"s@��
�
)��
7�
7�
7�F�)�$�/�/�K�!�+�s�3�3�K���	&��M�M�+�&�&�&�&����!�	O�	O�	O�6�t�[�#�N�N�N�N�N�N�N�N������)�<�+Q�R�	@�	@�	@��K� � � ��M�&�,�0�7�7��D�D�
F�
F�
F�"�1��?�?�?�F�F�F�	@����
��%�%�%�%��L��%�%�%�%�����;��s<�A�
C?�C,�A5�0C?�5A4C,�)C?�+C,�,C?�?Dc���t|��\}}|�|��rB	|�|d���d��}|S#tj$rYdSwxYwdS)N�
htaccess_list�,)r��has_section�get�splitr��
NoOptionError)r1�doc_rootrY�_r�s     r3�get_htaccess_cacher�9s���D�!�!�I�F�A�
���(�#�#��	�"�J�J�x��A�A�G�G��L�L�M� � ���)�	�	�	��4�4�	�����4s�*A�A'�&A'c�b�|�d��}ttt|����}t	|��\}}|�|��s|�|��|�|dd�|����t|||��dS)N�
r�r�)
r��list�filter�boolr�r��add_section�setrgr^)r1r��datarYr@s     r3�write_htaccess_cacher�Ds����:�:�d���D���t�T�"�"�#�#�D�%�d�+�+��F�K����h�'�'�%����8�$�$�$�
�J�J�x��#�(�(�4�.�.�9�9�9���{�F�+�+�+�+�+r5c���t|��\}}|�|��r*|�|d���d��}n.|�|��|�|dd��g}||vrt|�|��ttt|����}|�|dd�
|����t|||��dSdS)Nr�r��)r�r�r�r�r�r��appendr�r�r�rgr^)r1r�r�rYr@r�s      r3�update_htaccess_cacher�Ps���%�d�+�+��F�K�
���(�#�#���
�
�8�_�=�=�C�C�C�H�H�
�
����8�$�$�$��
�
�8�_�b�1�1�1��
��=�(�(����\�*�*�*��V�D�-�8�8�9�9�
��
�
�8�_�c�h�h�}�.E�.E�F�F�F��T�;��/�/�/�/�/�	)�(r5c��t|d���}g}d}|D]R}|�t��rd}|�t��rd}�;|s|�|���St|��}t
||dd���dS)z�
    Removes clpassenger lines from .htaccess to stop application
    :param htaccess_filename: Application .htaccess path
    :return: None
    r7r8FTr(N)r�
startswith�HTACCESS_BEGIN�HTACCESS_ENDr��rm_double_empty_linesr%)�htaccess_filename�lines�	new_lines�	in_config�lines     r3�$remove_passenger_lines_from_htaccessr�_s���
�,�5F�G�G�G�E��I��I��#�#���?�?�>�*�*�	��I��?�?�<�(�(�	��I���	#����T�"�"�"��%�i�0�0�I��%�y�#�>O�P�P�P�P�P�Pr5Tc
���t||��\}
}tj�|
��r3tj�|
��stjd���|dvrtjd|z���t|��}	t|||��}
|dkr|
d}tjd|z���|s|
d}n)#t$r|�tjd	|z���YnwxYw|d
krtj�|��}t|tj�
||����\}}tj�
|d��}d}tj�|��r�t|d
���}t|vr�|���D]�}tj�|d��tjz}tj�tj�||tjzg����d
kr'|d}||
krtjd|z���d}��|���}ng}|�rC|�d
��|�t��|�d|
z��|�d|z��|�d|����d|�d���|dkr-|�d��|�d|z��|	r|dvr|�d|	z��|�t.��t1|��}t3|��t5|d�|D��d
���t7|||��|rt9||||���dSdS)aX
    Configure passenger application
    :param user: name of unix user
    :param directory: name of dir in user home
    :param alias: alias of application
    :param interpreter: interpreter which execute application
    :param binary: binary of interpreter that execute application
    :param populate: True if application have to be be populated
    :param action: action with apllication. can be transit or None
    :param doc_root: doc_root
    :param startup_file: start application file
    :param passenger_log_file: Passenger log filename to write to app's .htaccess
    :return: None
    z,Destination exists and it is not a directory)�python�ruby�nodejszUnsupported interpreter ('%s')�transit�	directoryz(Specified directory already used by '%s'�docrootNz8No such application (or application not configured) "%s"r��	.htaccessTr7r8�aliaszhSpecified alias is already used by the other application: '%s'. Please, specify another application url.FzPassengerAppRoot "%s"zPassengerBaseURI "/%s"�	Passengerz "�"r�zPassengerAppType nodezPassengerStartupFile %s)r�r�zPassengerAppLogFile "%s"c3� K�|]	}d|zV��
dS�z%s
N���.0r�s  r3�	<genexpr>zconfigure.<locals>.<genexpr>�s&����"C�"C�T�6�D�=�"C�"C�"C�"C�"C�"Cr5)�startup_file)r"rKr`rxrbr�WebAppError�InterpreterError�summaryr&r��NoSuchApplication�normpathrgr$r��values�sepra�commonprefix�
splitlinesr��titler�r�r#r%r��populate_app)r1r�r��interpreter�binary�populate�actionr�r��passenger_log_file�abs_dirr��user_summary�app_summary�
exists_dir�	abs_alias�htaccess�htaccess_needs_update�htaccess_raw�item�
item_aliasr�s                      r3�	configurervs�� �T�9�-�-�J�G�Q�	�w�~�~�g���<�r�w�}�}�W�'=�'=�<��(�:�<�<�	<��6�6�6��-�,�{�:�<�<�	<��4�=�=�L�.�-�d�I�|�L�L���Y���$�[�1�J� �,�-W�Zd�-d�e�e�e��	.�"�9�-�H����X�X�X��� �2�J�Y�V�X�X�
X���X����
��{�{��� � ��'�'���t�R�W�\�\�(�E�%B�%B�C�C�L�I�q��w�|�|�I�{�3�3�H� ��	�w�~�~�h���� ��2C�D�D�D���\�)�)�$�+�+�-�-�
6�
6�� �W�-�-�d�7�m�<�<�r�v�E�
��7�?�?�2�7�#7�#7��U�R�V�^�8T�#U�#U�V�V�Z\�\�\�!%�k�!2�J�!�W�,�,�,�8�Z�\f�g�h�h�h�
16�-���'�'�)�)������8�
���R����
���^�$�$�$�
���,�w�6�7�7�7�
���-��5�6�6�6�
����;�+<�+<�+>�+>�+>�+>����G�H�H�H��(�"�"��L�L�0�1�1�1��L�L�2�\�A�B�B�B��	J�+�1E�"E�"E��L�L�3�6H�H�I�I�I�
���\�"�"�"�%�e�,�,���	������"C�"C�U�"C�"C�"C�L]�^�^�^�^��d�H�h�7�7�7��N��T�9�k��M�M�M�M�M�M�N�Ns�C�#C8�7C8c
�z�tt|����D�]\}}|\}}tj�|d|df��}t|d|��\}}}tj�|d��}tj�|d��}t||��\}}}	tj�t||	��d|��}
|d}t|��t||||d|
|d�����dS)Nr�rrr
rr�)r�)r�_summaryrKr`r�r!ra�basenamergr"�_unconfigurer)r1�domain_aliasr�r�r��old_homer��
binary_dir�binary_name�_binaryr�
htaccess_paths            r3�fix_homedirr�s%��'�����7�7�a�a���d����5��7�'�'��k�):�D��N�(K�L�L��%�d�;�&7��B�B���1�i�
�W�_�_�T�(�^�4�4�
��g�&�&�t�H�~�6�6��#�J��9�9�
��1�g�����k�$��8�8��;�[�I�I���Z�(�
��]�#�#�#��$�	�5�$�}�*=�v�PT�U^�P_�`�`�`�`�`�a�ar5c�P�t||t|����}|p|d}|p|}tj�||��}tj�|d��}tj�||��}	tj�|	d��}
t|||
��sht
|��t|d���}t|d���	��t|
|dd���t||
|��dSdS)Nr�r�r7r8r(�a)r&r�rKr`rgr'rrr:rFr%r�)r1r��	old_alias�	new_alias�old_doc_root�new_doc_root�app_data�
old_abs_alias�old_htaccess�
new_abs_alias�new_htaccessr�s            r3�mover&�s��&�t�Y���
�
�F�F�H��6�8�I�#6�L��/�<�L��G�L�L��y�9�9�M��7�<�<�
�{�;�;�L��G�L�L��y�9�9�M��7�<�<�
�{�;�;�L��t�\�<�@�@�@��\�"�"�"��|�4E�F�F�F���\�3���%�%�'�'�'���e�S�9J�K�K�K�K��d�L�,�?�?�?�?�?�@�@r5c�J�t|��D]}t||���dSrE)r��unconfigure)r1r�s  r3�purger)�s4���T�]�]�%�%�	��D�)�$�$�$�$�%�%r5c�N�t||��\}}tj�|d��}tj�|d��}t	|��t	|��tj�|t
��}tj�|t��}	tj�||��}
tj�|��}tj�|	��}tj�|
��}
|rt|��tk}|rt|	��tk}|
rt|
��tk}|dkr:|st|	t��|r |rt|��t|
��n�|dkr;|st|td��|r |rt|	��t|
��n�|dkr�|
sctj�|
��}tj�|��st!|d��t|
t��|
r |rt|��t|	��t#||��dS)	z�
    Populate application
    :param user: name of unix user
    :param directory: application path in user's home
    :param interpreter: interpreter which run application
    :param startup_file: main application file
    :return: None
    �public�tmpr�r�r(r�i�N)r"rKr`rgr#�	RACK_PATH�	WSGI_PATH�isfiler$�
RACK_TEMPLATE�
WSGI_TEMPLATE�APPJS_TEMPLATEr r�rarbr�restart)r1r�rr�r�rel_dir�
app_public�app_tmp�app_configru�app_wsgi�app_js�configru_installed�wsgi_installed�appjs_installed�configru_unchanged�wsgi_unchanged�appjs_unchanged�dir_paths                  r3r�r��sa��#�4��3�3��G�W�����g�x�0�0�J��g�l�l�7�E�*�*�G��J�����G�����7�<�<���3�3�L��w�|�|�G�Y�/�/�H�
�W�\�\�'�<�
0�
0�F������5�5���W�^�^�H�-�-�N��g�n�n�V�,�,�O��F�&�|�4�4�
�E���>�"�8�,�,�
�=���>�#�F�+�+�~�=���h����	0��x��/�/�/��	�"4�	��L�!�!�!��F�O�O�O��	��	�	�!�	9��|�]�C�8�8�8��	�n�	��H�����F�O�O�O��	��	 �	 ��	/��w���v�.�.�H��7�=�=��*�*�
.��X�u�-�-�-��v�~�.�.�.��	��	��L�!�!�!��H�����D�)�����r5c�R�	tj|��dS#t$rYdSwxYwrE)rK�unlinkrS)r`s r3r�r�1s:��
�
�	�$��������
�
�
����
���s��
&�&c��tjd|ddgtjtjdd���}|���\}}|S)Nz	/bin/findz-namer�r7T)�stdout�stderrr9�text)�
subprocess�Popen�PIPE�communicate)r��p�
stdoutdatar�s    r3�_find_htaccess_filesrM8sM����+�x��+�F� *�� *�� 1�"�		$�	$�	$�A��m�m�o�o�O�Z���r5c�h�|�t|��n|}g}|D]�\}}|��t||��}|s0t|��}t|||��t||��}|��M|D];}|r7tj�|��}	|�||	|f���<��t||��SrE)	rr�rMr�rKr`rar��_htaccess_summary)
r1�userdomains_data�domain_docroot_pairs�domain_alias_docroot�domainr�rfrL�ht_pathr�s
          r3rrCs���
1A�0H�;�t�,�,�,�N^����0�G�G�������+�D�(�;�;���	@�-�h�7�7�J� ��x��<�<�<�/��h�?�?�N��!��%�	G�	G�G��
G������0�0��$�+�+�V�U�H�,E�F�F�F��	G�
�T�#7�8�8�8r5c�^�i}|D�]�\}}}tj�|d��}	t|d���}n#tt
f$rY�MwxYwt
jd|tj��}|s�tt
jd|tj��}	|	s��t||��\}
}t||��\}}t|
|��\}}}|�tj��}||f}
t
jd|tj��}|r*t|���d|��s��@||||���d|	���d	���|	���d
d�||
<���|S)Nr�r7r8z+^PassengerAppRoot\s+"?(?P<directory>.+?)"?$zD^Passenger(?P<interpreter>Python|Ruby|Nodejs)\s+"?(?P<binary>.+?)"?$z(^PassengerBaseURI\s+"?(?P<appuri>.+?)"?$�appurir�rr)r
rSr�r�rr)rKr`rgr$r?rS�re�search�	MULTILINEr"r!�lstripr��compare_aliases�	groupdict�lower)r1rR�summrSr�r�r
r�approotr�	alias_absr��doc_root_absrrVs               r3rOrO^s���
�D�#7�'
�'
����x��7�<�<��{�3�3��	�$�X�6G�H�H�H�L�L����!�	�	�	��H�	�����)�9��"�,�(�(���	���i�
#��"�,�(�(���	��"�4��/�/��	�1�%�d�H�5�5���a�!�)�\�:�:���1�e����R�V�$�$����'����E�'���7�7���	�/�&�*:�*:�*<�*<�X�*F��N�N�	��!��� �*�*�,�,�[�9�&�0�0�2�2�=�A�G�G�I�I�!�+�+�-�-�h�7�

�
��\����Ks�?�A�Ac���tj�|�d����tj�|�d����kS)N�/)rKr`r��strip)�alias1�alias2s  r3r[r[�sF��
�7���F�L�L��-�-�.�.�"�'�2B�2B�6�<�<�PS�CT�CT�2U�2U�U�Ur5c��i}tt||�����D]�\}}|\}}|d}	t||��\}}	nf#tj$rTtjt
jd�tj	�
|d��|����Y��wxYw||d<	t||	|��}
d|
vrg|
d<��|
d�|����#t$r|g|d<|||	<Y��wxYw|S)N)rPr�z1{} is broken, directory {} is not in user's home.r�r��domains)rrr"r�	WrongDatarVrWrXrKr`rgr&r�r�)r1rP�summ_resultr�valuerSr��app_rootr�r�rs           r3r�r��s^���K�(��$�IY�)Z�)Z�)Z�[�[�6�6���e�$�
�����%��		�&�t�X�6�6�L�A�y�y���'�	�	�	��M��"�D�K�K��G�L�L���4�4����
�
�
�
�H�	������g��
	6�1�$�	�;�O�O�K���+�+�)+��I�&�&��I�&�-�-�f�5�5�5�5���	+�	+�	+� &�x�E�)��%*�K�	�"�"�"�	+�����s$�A�A B+�*B+�4C+�+D�Dc�p�t||t|����}|d}t|��dS)Nr
)r&r�r)r1r�r!r
s    r3r(r(�s7��&�t�Y���
�
�F�F�H��
�#�H�������r5c�"�t|d���}|���}g}d}|D]6}|tkrd}�|tkrd}�|r�!|�|���7t|��}t
|d�|D��dd���dS)Nr7r8FTc3� K�|]	}d|zV��
dSr�r�r�s  r3r�z_unconfigure.<locals>.<genexpr>�s&����?�?��v��}�?�?�?�?�?�?r5r()r$r�r�r�r�r�r%)r
rr�r�r�r�s      r3rr�s����X�.?�@�@�@�L��#�#�%�%�E��I��I��	�	���>�!�!��I���<����I���	����������!�)�,�,�E��H�?�?��?�?�?��M^�_�_�_�_�_�_r5c#�K�|�tj��D]&}tj�||��}|V��'dSrE)r�rKr�r`rg)�root�subrKs   r3�	iter_pathrs�sM����
�Y�Y�r�v�
�
�����w�|�|�D�!�$�$���
�
�
�
��r5c�<�t||��\}}tj�|��st	jdd|iz���tj�|d��}tj�|��stj|��tj�|t��}tj�|��rtj	|d��dSt|d�����dS)NzMissing directory %(abs_dir)srr,r)r"rKr`rxr�MissingApprootDirectoryrgrc�RESTART_PATH�utimer:rF)r1r�rr��tmp_dir�app_restarts      r3r3r3�s����T�9�-�-�J�G�Q�
�7�>�>�'�"�"�m��4�5T�Xa�cj�Wk�5k�l�l�l��g�l�l�7�E�*�*�G�
�7�>�>�'�"�"��
�������'�,�,�w��5�5�K�	�w�~�~�k�"�"�'�
���d�#�#�#�#�#��[�#���$�$�&�&�&�&�&r5c��g}d}|D]3}|���rd}n|r�d}|�|���4|r
|dd�S|S)NTF���)rdr�)r��_lines�
empty_liner�s    r3r�r��sr��
�F��J������:�:�<�<�	��J�J�
�	���J��
�
�d��������c�r�c�{���Mr5)NNrE)i�
__future__rrrr;r,rVr�future.utilsr�future.movesrr�rO�loggingrKrWrG�clcommonr	r
�clcommon.cpapir�clcommon.utilsrr
rr�clquotarrrrrrr�lveapirr�secureiorr�typingrr�clselectexceptrrr r!r"r#r$r%r&r'�	getLogger�__name__r��setLevel�ERROR�
StreamHandlerr:�null_handler�
addHandlerr�r�r-r0rvr.r1�
APPJS_PATHr2r4rCrHr^rNrir�r�r�r�r�r�r�r�r�rrr&r)r�r�rMrrOr[r�r(rrsr3r�r�r5r3�<module>r�s��'�&�&�&�&�&�%�%�%�%�%�%�����������
�
�
�
�
�
�
�
�������"�"�"�"�"�"�5�5�5�5�5�5�	�	�	�	�����	�	�	�	�	�	�	�	�����%�%�%�%�%�%�%�%�&�&�&�&�&�&�E�E�E�E�E�E�;�;�;�;�;�;�;�;�'�'�'�'�'�'�E�E�E�E�E�E�E�E�E�E�E�E�E�E�E�E�E�E�$�$�$�$�$�$�$�$�1�1�1�1�1�1�1�1���������*�*�*�*�*�*�:�:�:�:�:�:�:�:�:�:�C�C�C�C�C�C�C�C�C�C�C�C�?�?�?�?�?�?�?�?�
��	�8�	$�	$������
����$�w�$�T�T�+�s�%;�%;�<�<�����,����M��H��
�	�	�
�!���	�
�
��
�	��@�@�@�
���
�
�
�&�&�&�>G�G�G�J�J�J�
*�*�*�Z���4���<=�=�=�6���.���	,�	,�	,�0�0�0�Q�Q�Q�.EI��D�z�VZ�WN�WN�WN�WN�ta�a�a�$@�@�@�@�&%�%�%�
=G�4�4�4�4�n
�
�
����9�9�9�9�6*�*�*�ZV�V�V�����B���`�`�`�*���'�'�'�����r5

Zerion Mini Shell 1.0