PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 131
a ye  @s ddlZeddddlmZddlmZddlmZddlmZddlZddl Z ddl Z ddl m Z m Z m Z ddlZ ddlZ ddlZddlZddlZddlZd ZzFddlZiZejd krd ed <ejefd diedd iZejZWnJzddlZeejd<Wn&ey.ddlZe ejd<Yn0Yn0iZ!e j"D]Z#e#e!e j"e#<q@ededgZ$ededgZ%ddZ&ddl'Z'ededfZ(ededfZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7d Z8d!Z9d"Z:d#Z;gd$Ze?d(kre>Z@dS))NGtkz3.0)r)Gdk)GLib) SELinuxDBus)DISABLED PERMISSIVE ENFORCINGzselinux-python)Tunicode localedirz/usr/share/localefallback_ZNoZYesZDisableZEnablecCs<|dur|durdS|dur dS|dur,dS||k||kS)Nr)abrr0/usr/lib/python3.9/site-packages/sepolicy/gui.pycmpGsrz Advanced >>z Advanced <>zAdvanced Search < To change from Disabled to Enforcing mode - Change the system mode from Disabled to Permissive - Reboot, so that the system can relabel - Once the system is working as planned * Change the system mode to Enforcing c@seZdZd#ddZddZddZd d Zd d Zd dZddZ ddZ ddZ ddZ ddZ ddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Zd=d>Z d?d@Z!dAdBZ"dCdDZ#dEdFZ$dGdHZ%dIdJZ&dKdLZ'dMdNZ(dOdPZ)dQdRZ*dSdTZ+dUdVZ,dWdXZ-dYdZZ.d[d\Z/d]d^Z0d_d`Z1dadbZ2dcddZ3dedfZ4dgdhZ5didjZ6dkdlZ7dmdnZ8dodpZ9dqdrZ:dsdtZ;dudvZd{d|Z?d}d~Z@ddZAddZBddZCddZDddZEddZFddZGddZHddZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVddZWddZXddZYddZZddZ[ddZ\ddZ]ddZ^ddZ_ddZ`d$ddZaddÄZbddńZcddDŽZdddɄZedd˄Zfdd̈́ZgddτZhddфZiddӄZjddՄZkddׄZlddلZmddۄZndd݄Zodd߄ZpddZqddZrddZsddZtddZuddZvddZwddZxddZyddZzddZ{ddZ|ddZ}ddZ~ddZddZddZddZddZddZdd Zd d Zd d ZddZddZd%ddZddZddZddZddZddZdd Zd!d"ZdS(& SELinuxGuiNFcBCsd|_d|_t|_t|_z|j}Wn8tjjy`}zt || WYd}~n d}~00| ||_ d|_ t}tjdddidd|_|jd }|||d |_|d |_|d |_|d |_|d|_|d|_ttjj|_ttjj |_!t"#d|_$d|_%d|_&d|_'d|_(d|_)d|_*g|_+g|_,i|_-|d|_.|d|_/|d|_0d|_1|d|_2|d|_3|j34|j5|d|_6|d|_7|d|_8d|_9|d|_:|d|_;|d|_<|d|_=|d|_>|d|_?|d|_@|d |_A|d!|_B|jBCd"tjDjE|d#|_F|jF4|j5|d$|_G|d%|_H|d&|_I|d'|_J|d(|_K|d)|_L|jLCd"tjDjE|d*|_M|jM4|j5|d+|_N|d,|_O|d-|_P|d.|_Q|d/|_R|d0|_S|d1|_T|d2|_U|d3|_V|d4|_W|d5|_X|d6|_Y|d7|_Z|d8|_[|d9|_\|d:|_]|d;|_^|j^Cd"tjDjE|d<|__|d=|_`|j`4|j5|d>|_a|d?|_b|d@|_c|dA|_d|dB|_e|dC|_f|dD|_g|dE|_h|dF|_i|dG|_j|dH|_k|dI|_l|dJ|_m|dK|_n|dL|_o|dM|_p|dN|_q|dO|_rg|_s|tdPkr|jiud|jkud|jrud|dQ|_v|dR|_w|dS|_x|y|dT|_z|dU|_{|dV|_||dW|_}|dX|_~|dY|_|dZ|_|d[|_|d\|_|d]|_|d^|_|d_|_|d`|_|da|_|db|_|dc|_|dd|_|de|_|df|_|dg|_|dh|_|di|_|dj|_|dk|_|dl|_|dm|_|dn|_|do|_|dp|_|dq|_|dr|_|ds|_|dt|_|du|_|dv|_|dw|_|dx|_|dy|_|dz|_|d{|_|d||_|d}|_|d~|_|d|_|d|_|d|_|jd|d|_|d|_|d|_|d|_|d|_|d|_|d|_|d|_|d|_|d|_|d|_|d|_|j4|j5|d|_|j|_|d|_|jCd"tjDjE|d|_|j|_|d|_|d|_|jCd"tjDjE|d|_|j4|j5|d|_|j|_|d|_|d|_|j4|j5|d|_|j|_|d|_|jĠCd"tjDjE|d|_|j |_|d|_|jŠ|_|d|_|d|_|jȠCd"tjDjE|d|_|jɠ4|j5|d|_|jʠ|_|d|_|d|_|j͠Cd"tjDjE|d|_|jΠ4|j5|d|_|jϠ|_|d|_|d|_|jҠCdPtjDjE|d|_|jӠ4|j5|d|_|d|_|d|_|d|_|j|_|jנ|_|d|_|d|_|j۠CdtjDjE|d|_|jܠ4|j5|d|_|jݠ|_|d|_|jߠ|_|d|_|d|_|jCdPtjDjE|d|_|j4|j5|d|_|j䠶|_|d|_|d|_|jCd"tjDjE|d|_|j4|j5|d|_|j䠶|_|d|_|d|_|d|_|d|_|jd"|jd"|j|jd|j|j|jd"tj|d|_|d|_|d|_|d|_|d|_|jd|_|d|_|d|_|d¡|_|dá|_|dġ|_|jd|j|j|dơ|_|jd|j|ja|dǡ|_|jd|j|jW|dȡ|_|jd|j|jH|dɡ|_|jd|j|j|dʡ|_|d |_|dˡ|_ |d̡|_ |d͡|_ |dΡ}|jd|j|jg|_ |jd|j |jҡd|_d}|rddg|_+|r ||j+vr |j+|nt|_+|j+jtjdэ|rf||j+vrf|td҃|| |t|j+} t} |j+D]} || | tt|jt| |_|j|j|j|j||  | gD]6} t!| }|r||| |j,|q|jd7_q|"|j#|j|j8#|j6|j$|j%|j&|j'|j(|j)|j*|j+|j,|j-|j.|j/|j0|j1|j2|j3|j4|j5|j6|j7|j8|j9|j:|j;|j<|j=|j>|j?|j@|jA|jB|j.|jC|jD|jE|jF|jG|jG|jH|jI|jJ|jK|jL|jM|jN|jO|jP|jQ|jR|jS|jE|jT|jU|jV|jW|jX|jY|jY|jY|jZ|j[|j\|j5|j]|j^dӜA} |_||`| |jtabd|jc|cd|_d|j"|j"|jetfkr~|gnV|j r|jh|j |ji|j |j|]n|k|jlt|md|_tndS)NFTZpurelibbasez/usr)varsz /sepolicy/zsepolicy.gladeouter_notebookZSELinux_windowZMain_selection_menumain_advanced_labelapplications_selection_buttonZ Revert_buttonrZadd_path_dialogerror_check_windowerror_check_labeladvanced_search_windowZadvanced_filterZ advanced_sortadvanced_filter_entryadvanced_search_treeviewZ Login_labellogin_seuser_comboboxZlogin_seuser_liststorelogin_name_entrylogin_mls_labellogin_mls_entryZ Login_buttonlogin_treeviewlogin_liststorer login_filterlogin_popup_windowlogin_delete_liststorelogin_delete_windowuser_popup_windowZ User_buttonuser_liststore user_filter user_treeviewuser_roles_comboboxZuser_roles_liststoreZ User_labeluser_name_entryuser_mls_labeluser_mls_level_entryuser_mls_entryZselinux_user_comboboxuser_delete_liststoreuser_delete_windowfile_equiv_labelfile_equiv_source_entryfile_equiv_dest_entryZfile_equiv_buttonfile_equiv_treeviewfile_equiv_liststorefile_equiv_popup_windowZfile_equiv_filterfile_equiv_delete_liststorefile_equiv_delete_windowapp_system_buttonZ System_buttonZLockdown_buttonZ Systems_boxZRelabel_buttonZRelabel_button_noadvanced_systemouter_notebook_frameZsystem_policy_type_labelselect_button_browsecancel_button_browsemoreTypes_window_filesZmore_types_file_liststoreZmoreTypes_treeview_filessystem_policy_type_liststoresystem_policy_type_comboboxrZEnforcing_button_defaultZPermissive_button_defaultZDisabled_button_defaultZenable_unconfinedZdisable_unconfinedZenable_permissiveZdisable_permissiveZ enable_ptraceZdisable_ptrace help_windowZ help_textv info_text help_imageforward_button back_button update_windowupdate_treeviewZUpdate_treestore apply_buttonZ Update_buttonZ Add_buttonZ Delete_buttonfiles_path_entrynetwork_ports_entryfiles_popup_windownetwork_popup_windowZ Network_labelZ files_labelZmake_path_recursiveZfiles_type_combo_storeZfiles_class_combo_storefiles_type_comboboxfiles_class_comboboxfiles_mls_labelfiles_mls_entryZAdvanced_text_filesZcancel_delete_filesZ tcp_buttonZ udp_buttonZnetwork_type_combo_storeZnetwork_type_comboboxnetwork_mls_labelnetwork_mls_entryZAdvanced_text_networkZcancel_network_deleteZShow_mislabeled_filesmislabeled_files_label warning_filesZ Modify_buttonfix_label_windowfixlabel_labelfix_label_cancelfiles_delete_windowfiles_delete_treeviewfiles_delete_liststorenetwork_delete_windownetwork_delete_treeviewnetwork_delete_liststore progress_barZExecutable_files_treeviewexecutable_files_filterZExecutable_files_tabZexecutable_files_treestoreZ files_buttonZWritable_files_treeviewZwritable_files_treestorewritable_files_filterZWritable_files_tabZApplication_files_treeviewapplication_files_filterZApplication_files_tabZapplication_files_treestoreZnetwork_buttonZoutbound_treeviewnetwork_out_liststorenetwork_out_filternetwork_out_tabZinbound_treeviewnetwork_in_liststorenetwork_in_filternetwork_in_tabZBoolean_treeviewboolean_liststoreboolean_filterZbooleans_more_detail_windowZbooleans_more_detail_treeviewZbooleans_more_detail_liststoreZBooleans_buttontransitions_into_treeviewtransitions_into_liststoretransitions_into_filterZTransitions_into_tabZTransitions_buttontransitions_from_treeviewtransitions_from_treestoretransitions_from_filterZTransitions_from_tabZfile_transitions_treeviewZfile_transitions_liststoreZfile_transitions_filterZfile_transitionsZ combobox_orgapplication_liststorecompletion_entryentrycompletion_objZShow_modified_only_toggleZEnforcing_labelZEnforcing_buttonZPermissive_button status_barzSELinux status filter_entry filter_boxadd_modify_delete_boxZactivateZfiles_toggle_deleteZtoggledZfile_equiv_toggle_delete1Zuser_toggle_deleteZlogin_toggle_deleteZnetwork_toggle_deleteZ toggle_updateZfiles_inner_notebookZnetwork_inner_notebookZtransitions_inner_notebook loading_guiZhttpd_tZabrt_t)keyz%s is not a valid domain)AZon_combo_button_clickedZon_disable_ptrace_toggledZ%on_entrycompletion_obj_match_selectedZon_filter_changedZ"on_save_changes_file_equiv_clickedZon_save_changes_login_clickedZon_save_changes_user_clickedZon_save_changes_files_clickedZon_save_changes_network_clickedZ)on_Advanced_text_files_button_press_eventZitem_in_tree_selectedZ2on_Application_file_types_treeview_configure_eventon_save_delete_clickedZ)on_moreTypes_treeview_files_row_activatedZon_retry_button_files_clickedZon_make_path_recursive_toggledZ&on_files_path_entry_button_press_eventZon_files_path_entry_changedZon_select_type_files_clickedZon_choose_fileZon_Enforcing_button_toggledZon_confirmation_closeZon_column_clickedZ on_tab_switchZon_file_equiv_button_clickedzon_app/system_button_clickedzon_app/users_button_clickedon_show_advanced_search_windowZ on_Show_mislabeled_files_toggledZon_Browse_button_files_clickedZon_cancel_popup_clickedZon_treeview_cursor_changedZ on_login_seuser_combobox_changedZon_user_roles_combobox_changedZon_cancel_button_browse_clickedZon_apply_button_clickedZon_Revert_button_clickedZon_Update_button_clickedZ on_advanced_filter_entry_changedZ)on_advanced_search_treeview_row_activatedZ!on_Select_advanced_search_clickedZ!on_info_button_button_press_eventZon_back_button_clickedZon_forward_button_clickedZ#on_Boolean_treeview_columns_changedZon_completion_entry_changedZon_Add_button_clickedZon_Delete_button_clickedZon_Modify_button_clickedZon_Show_modified_only_toggledZon_cancel_button_config_clickedZon_Import_button_clickedZon_Export_button_clickedZon_enable_unconfined_toggledZon_enable_permissive_toggledZ&on_system_policy_type_combobox_changedZ#on_Enforcing_button_default_toggledZ$on_Permissive_button_default_toggledZ"on_Disabled_button_default_toggledZon_Relabel_button_toggled_cbZ%on_advanced_system_button_press_eventZon_files_type_combobox_changedZon_filter_row_changedZon_button_toggledZ gtk_main_quitr(o finish_initZ advanced_init START_PAGEopagerdbus customized exceptions DBusExceptionprintquitinit_cur application filter_txtrZBuilder sysconfigZget_path code_pathZ add_from_fileZ get_objectr)windowmain_selection_popoverr*r+ revert_buttonrZCursorZ CursorTypeZWATCH busy_cursorZLEFT_PTR ready_cursorselinuxselinux_getpolicytype initialtype current_popup import_export clear_entry files_add network_addmislabeled_filesZ all_domainsZinstalled_listZpreviously_modified file_dialogr,r-Z invalid_entryr.advanced_search_filterZset_visible_funcfilter_the_dataZadvanced_search_sortr/r0Zadvanced_search login_labelr1login_seuser_combolistr2r3r4login_radio_buttonr5r6Zset_sort_column_idZSortTypeZ ASCENDINGr7r8r9r:r;user_radio_buttonr<r=r>r?user_roles_combolist user_labelr@rArBrCZ user_comboboxrDrErFrGrHfile_equiv_radio_buttonrIrJrKZfile_equiv_treefilterrLrMrNsystem_radio_buttonlockdown_radio_buttonZ systems_boxrelabel_buttonrelabel_button_norOrPsystem_policy_labelrQrRrSmore_types_files_liststoremoreTypes_treeviewrTrUZ policy_listpopulate_system_policy set_visibleenforcing_button_defaultpermissive_button_defaultdisabled_button_defaultinitialize_system_default_modeenable_unconfined_buttondisable_unconfined_buttonenable_permissive_buttondisable_permissive_buttonZenable_ptrace_buttondisable_ptrace_buttonrV help_textrWrXrYrZr[r\update_treestorer] update_button add_button delete_buttonr^r_r`rapopup_network_labelpopup_files_labelrecursive_path_togglefiles_type_combolistfiles_class_combolistrbrcrdreadvanced_text_filesZfiles_cancel_buttonnetwork_tcp_buttonnetwork_udp_buttonnetwork_port_type_combolistnetwork_port_type_comboboxrfrgadvanced_text_networkZnetwork_cancel_buttonshow_mislabeled_files_onlyrhri modify_button set_sensitiverjrkrlrmrnrorprqrrrsexecutable_files_treeviewrtexecutable_files_tabZget_tooltip_textZ executable_files_tab_tooltip_txtexecutable_files_liststorefiles_radio_buttonZfiles_button_tooltip_txtwritable_files_treeviewwritable_files_liststoreruwritable_files_tabZwritable_files_tab_tooltip_txtapplication_files_treeviewrvapplication_files_tabZ!application_files_tab_tooltip_txtapplication_files_liststorenetwork_radio_buttonZnetwork_button_tooltip_txtnetwork_out_treeviewrwrxryZnetwork_out_tab_tooltip_txtnetwork_in_treeviewrzr{r|Znetwork_in_tab_tooltip_txtboolean_treeviewr}r~boolean_more_detail_windowZboolean_more_detail_treeview!boolean_more_detail_tree_data_setboolean_radio_button active_buttonZboolean_button_tooltip_txtrrrtransitions_into_tabZ transitions_into_tab_tooltip_txttransitions_radio_buttonZtransitions_button_tooltip_txtrrrtransitions_from_tabZ transitions_from_tab_tooltip_txttransitions_file_treeviewtransitions_file_liststoreZtransitions_file_filtertransitions_file_tabZ transitions_file_tab_tooltip_txtZ combobox_menurrrZset_minimum_key_lengthZset_text_columnZset_match_func match_funcZset_completionZset_icon_from_stockZ STOCK_FINDshow_modified_onlycurrent_status_labelcurrent_status_enforcingcurrent_status_permissiverZget_context_id context_idrrrcellZdel_cell_filesconnecton_toggle_updateZdel_cell_files_equivZ del_cell_userZdel_cell_loginZdel_cell_networkZ update_cellinner_notebook_filesinner_notebook_networkinner_notebook_transitionsZ all_entries on_toggleZloadingappendsepolicyZget_all_domainssortstrlowererrorr showlenZget_init_entrypoints_str combo_box_addfloatZ percentageZ set_fractionZset_pulse_step idle_funcgetZfind_entrypoint_pathhideZ set_modelopen_combo_menuon_disable_ptraceset_application_labelget_filter_dataupdate_to_file_equivupdate_to_loginupdate_to_userupdate_to_filesupdate_to_networkreveal_advancedcursor_changed resize_wraprpopulate_type_comboinvalid_entry_retryrecursive_pathhighlight_entry_textautofill_add_files_entryselect_type_moreon_browse_select set_enforceconfirmation_closecolumn_clicked clear_filtersshow_file_equiv_pagesystem_interfaceusers_interfacershow_mislabeled_filesbrowse_for_files close_popuplogin_seuser_combobox_changeuser_roles_combobox_changeclose_config_windowapply_changes_button_pressupdate_or_revert_changesget_advanced_filter_dataadvanced_item_selectedadvanced_item_button_pushon_help_buttonon_help_back_clickedon_help_forward_clickedresize_columnsapplication_selectedadd_button_clickeddelete_button_clickedmodify_button_clickedon_show_modified_onlyimport_config_showexport_config_showunconfined_togglepermissive_togglechange_default_policychange_default_moderelabel_on_rebootreveal_advanced_systemshow_more_types tab_change closewindowpreviously_modified_initializeZconnect_signalsrZtimeout_add_secondsselinux_statuslockdown_initedstatusrshow_system_page set_labelset_textshow_applications_page clearbuttonsset_current_pagereinitmain)selfapptestreZbuilderZ glade_filerpathlengthZentrypoint_dictdomainZ entrypointdicrrr__init__vs                                                                                                                                                                                                                  "  H           zSELinuxGui.__init__cCsi|_tD]}i|j|<q dSN)cur_dictkeys)rRkrrrrrszSELinuxGui.init_curcCsHd}|jD]8}|j|D](}||kr8|j||=dS|d7}qq dSNrr)r\)rRctrir^jrrr remove_curws  zSELinuxGui.remove_curcCszt|_Wnty&t|_Yn0|jtkr|jd|jd|jd|j d|j |j t d|jtn ||jtjdr|jdn |jdtd}td}|tkr|j d|tkr|jd|tkr |jddS)NFzSystem Status: Disabled /.autorelabelTr)rZsecurity_getenforcerIOSErrorrrrrrrrpushrr rWrK DISABLED_TEXTset_enforce_textosrVexistsr set_activerrselinux_getenforcemoderrrr)rRZ policytypemoderrrrGs0                zSELinuxGui.selinux_statuscCs|jr dS|d|_|jtdi|_|j dD]:}| }t |dkrZq@|dt |dkd|j|d<q@|j |jdd  |j |jd d  | dS) NTZ deny_ptrace r r)priorityDisabledr unconfinedrppermissivedomains)rH wait_mouserrkrZsecurity_get_boolean_activeZ module_dictrZ semodule_listsplitrrr ready_mouse)rRmmodrrr lockdown_inits "zSELinuxGui.lockdown_initcGs|}|sdS|jtkr4|dkr4||j||jtkrp|j|d}|dkrp|rp| |j|d|jt kr|j|d}|r|j |j |dS)NZmore_detail_colr Zrestorecon_colrr)get_selected_iterr BOOLEANS_PAGEZget_namedisplay_more_detailr FILES_PAGE liststore get_valuefix_mislabeledTRANSITIONS_PAGErZclickedrrL)rRtreeviewZtreepathZtreecolargsiterZvisibleZ bool_namerrrr"s     zSELinuxGui.column_clickedcCstrtqdSr[)rZevents_pendingZmain_iterationrRrrrr szSELinuxGui.idle_funccCs<z$|j|d|dkr WdSWdSty6Yn0dS)NrrTF)rr~findAttributeError)rRZ completionZ key_stringrZ func_datarrrrs  zSELinuxGui.match_funccCs|j|jdk|j|jt|jdkz0td|j|j|jfd}|}| Wnt ytd}Yn0|j }| |d|ji|j ||jd|j|j|jf||jdS)Nrrz %shelp/%s.txtrr&APPz %shelp/%s.png)rZr help_pagerYr help_listopenrreadcloseIOErrorrZ get_bufferrLrZ set_bufferrXZ set_from_file show_popuprV)rRfdbufrrrrhelp_show_pages     zSELinuxGui.help_show_pagecGs|jd8_|dSNrrrrRrrrrr3szSELinuxGui.on_help_back_clickedcGs|jd7_|dSrrrrrrr4sz"SELinuxGui.on_help_forward_clickedcGs^d|_g|_|jtkr.|jtddg|_|jtkrR|jtdgd|_|jtkr|j }|t kr|jtddg|_|t kr|jtdd g|_|t kr|jtd d g|_|jtkr|j }|tkr|jtd d g|_|tkr|jtddg|_|jtkr|j }|tkrX|jtdgd|_|tkrz|jtddg|_|tkr|jtddg|_|jtkr|jtdgd|_|jtkr|jtdgd|_|jtkr|jtdddg|_|jtkr2|jtddg|_|jtkrV|jtdd g|_|S)!NrzHelp: Start PagestartzHelp: Booleans Page)ZbooleansZbooleans_toggledZ booleans_moreZbooleans_more_showzHelp: Executable Files PageZ files_execzHelp: Writable Files PageZ files_writezHelp: Application Types PageZ files_appz'Help: Outbound Network Connections PageZports_outboundz&Help: Inbound Network Connections PageZ ports_inboundz&Help: Transition from application Page)Ztransition_fromZtransition_from_booleanZtransition_from_boolean_1Ztransition_from_boolean_2z&Help: Transition into application PageZ transition_toz&Help: Transition application file PageZtransition_filezHelp: Systems Page)systemZsystem_boot_modeZsystem_current_modeZ system_exportZsystem_policy_typeZsystem_relabelzHelp: Lockdown Page)ZlockdownZlockdown_unconfinedZlockdown_permissiveZlockdown_ptracezHelp: Login Pager Z login_defaultzHelp: SELinux User PageuserszHelp: File Equivalence PageZ file_equiv)rrrrrV set_titler rzr|rget_current_pageEXE_PAGE WRITABLE_PAGEAPP_PAGE NETWORK_PAGEr OUTBOUND_PAGE INBOUND_PAGErrTRANSITIONS_FROM_PAGETRANSITIONS_TO_PAGETRANSITIONS_FILE_PAGE SYSTEM_PAGE LOCKDOWN_PAGE LOGIN_PAGE USER_PAGEFILE_EQUIV_PAGErrRripagerrrr2sl                      zSELinuxGui.on_help_buttoncGs|j|j|jdSr[)rZset_relative_tor+Zpopuprrrrr (szSELinuxGui.open_combo_menucGs d|_dSNT)rrrrrr,sz SELinuxGui.set_application_labelcGs t|dSr[rrrrrr/szSELinuxGui.resize_wrapcCsHtd|_|jtkr |j|_|jtkr2|j|_|jtkrD|j |_dSr) rrl enforce_moderrenforce_buttonrrrrrrrrr2s   z)SELinuxGui.initialize_system_default_modecCsrttjtddd}|d}|D]B}|j}|j|d|||j krd|j |||_ |d7}q*|S)NT)topdownrr) nextriwalkrZ selinux_pathrrTr set_valuerrUrk typeHistory)rRtypesr`itemrrrrr;s    z!SELinuxGui.populate_system_policyc Gs|jdkrdSztd|D]v}zZ|||}|dusH|dusH|durLWq||jdksp||jdkrzWWdSWqttfyYq0qWn Yn0dS)Nr&TrFr)rrange get_n_columnsr~rrr TypeError)rRlistrrxvalrrrrHs  $ zSELinuxGui.filter_the_datac Cs|D]x}||D]j\}}d||f} | |jdvrh|jd| ddkrPq||jd| dkrhq||d|||qqdS)N,raction-dtype, )r]joinr\network_initial_data_insert) rRrSnetdprotocol directionmodelr^tportsZpkeyrrr net_update[s zSELinuxGui.net_updatecCs|t}|j|D]}|j}||drV||}|||d}n|}||d}|j|d||j|d||j|d||dq|dS)Nmodifyequivrrr) rsrZget_file_equivrJclearrmarkuprru)rRZedictfrnamerrrrfile_equiv_initializefs     z SELinuxGui.file_equiv_initializec Cs||jtD]}|j}|j|dt|d|d}d|vrZ|d|j|dd ||j|d| dd |j|d | d d |j|d d q| dS)NrrrolesZobject_rrrrlevelr&r rrT) rsr<rrget_selinux_usersrrrremoverr ru)rRurrrrruser_initializexs    zSELinuxGui.user_initializecCs||jtD]Z}|j}|j|d|d|j|d|d|j|d|d|j|ddq|dS) Nrrrseuserrmlsr T)rsr6rrZget_login_mappingsrrru)rRrrrrrlogin_initializes   zSELinuxGui.login_initializecCs|tjj|dddd}|||dt|jtjj|dddd}|||dt|jtjj|dddd}|||dt|jdS)Ntcp name_connectTZ check_bools name_bindudp)rnetworkget_network_connectrrrwrrz)rRrSrrrrnetwork_initializes zSELinuxGui.network_initializecCsD|}||d|||d|||d|||dddS)NrrrrTrr)rRrrZportTyperrrrrrs z&SELinuxGui.network_initial_data_insertcCsd}|}|D](}|d|kr0||dS|d7}q||d}||dtdkrp||}|d}n|}||d|||dS)NrrMore...) get_modelrkget_iterr~r Z insert_beforerr)rRcomboboxrr`r}raniterrrrrcombo_set_active_texts     z SELinuxGui.combo_set_active_textcCs2|}|}|dkrdS||}||dSNr)r get_activerr~)rRrr}indexrrrrcombo_get_active_texts  z SELinuxGui.combo_get_active_textcCs:|dur dS|j}|j|d||j|d|dSr_)rrr)rRrval1rrrrrs  zSELinuxGui.combo_box_addcGsN|j}|d}|dur"dS|j|d}||j|||jdSNrr) r get_selection get_selectedrr~rrbrErS)rRrrSrrrrrs  zSELinuxGui.select_type_morecGsx|j}|\}}||}|j|}|j|d}|durFdS|jd|j | |j |j |dSNrr&)r0rrconvert_iter_to_child_iterrrr~r/rLr.r rr*r)rRrrowrrrSrrrr1s       z$SELinuxGui.advanced_item_button_pushcGs`|j|}|j|}|j|d}|jd|j| |j |j || dSr) rrrrr~r/rLr.r rr*rr6)rRrrVrrrSrrrr0s      z!SELinuxGui.advanced_item_selectedcCs2|r.t|dkr.|jD]}||dkrdSqdSNrTF)rr)rRrSitemsrrrfind_applications   zSELinuxGui.find_applicationcGs|jd|jd|jd|jd|j}||sHdS| |j d|j d|j |j|j|j|j|j|j|j|jz*|ddkrt|}|sWdS||_WntyYn0|||j|| |d|_!|"||#||$||%||&||'||(||j)*t+d||j,*t+d||j-*t+d||j.*t+d ||j/*t+d ||j0*t+d ||j1*t+d ||j2*t+d ||j34t+d||j54t+d||j64t+d||j3*t+d||j5*t+d||j6*t+d||j7*t+d|||_|j84|j|9dS)NFr&Tr/z(File path used to enter the '%s' domain.z)Files to which the '%s' domain can write.z6Network Ports to which the '%s' is allowed to connect.z5Network Ports to which the '%s' is allowed to listen.z File Types defined for the '%s'.zODisplay boolean information that can be used to modify the policy for the '%s'.z;Display file type information that can be used by the '%s'.zADisplay network ports to which the '%s' can connect or listen to.z!Application Transitions Into '%s'z!Application Transitions From '%s'zFile Transitions From '%s'zVExecutables which will transition to '%s', when executing selected domains entrypoint.zQExecutables which will transition to a different domain, when '%s' executes them.z4Files by '%s' with transitions to a different label.zADisplay applications that can transition into or out of the '%s'.):rrrhrirrLrget_textrrMrrrrrrzrwr}rrrrrrZget_init_transtyper IndexErrorrsrFrrrPboolean_initializerexecutable_files_initializerwritable_files_initializetransitions_into_initializetransitions_from_initializeapplication_files_initializetransitions_files_initializerset_tooltip_textr rryr|rrrrrrKrrrr+ru)rRrrSrrrr6sr                             zSELinuxGui.application_selectedcCs tt|_t|_dSr[)rrPZ get_fcdictfcdictZget_local_file_pathslocal_file_pathsrrrrrP+s zSELinuxGui.reinitcCsi|_|dD]}|}t|dkr,q|ddkr:q|d|jvrVi|j|d<|ddkrd|ddki|jd|d <|dd kr|d |d d |jd |d <|ddkrd|d i|jd|d <|ddkrd|d |d d|jd|d <|ddkr2d|d i|jd|d |df<|ddkrf|d |d |dd|jd|d <|ddkr|ddkrd|jvri|jd<d|d i|jd|d <n"d|d i|jd|d |d f<|ddkrd|ddki|jd|d <qd|jvrdSd|jfd |jffD]2\}}||jdvr&||jd|dq&tD]"}||jvr^|j|iiq^dS)!Nrnrrz-Dractiverz-1rr r r)rrr$rr!s0)rrrolerr#r)maskrrrz-errr"enabledrrqrr) cust_dictrtrrrrkr]update)rRrraZrecZsemodulebuttonrrrrF0sJ      ""&  "    z)SELinuxGui.previously_modified_initializecCst||_|jD]}t|j|dkr.q|j|d}|j|dD]`}||f|jdvr|jd||fddkr|qJ||jd||fdkrqJ||j|||qJqdS)Nrrrrrr)rZget_entrypoints entrypointsr]rr\files_initial_data_insertr)rRrexe file_classrVrrrrZs z&SELinuxGui.executable_files_initializecCsBz(t|dd}t|d}||kWSty<YdS0dS)NrrF)r matchpathcon getfileconre)rRrVconcurrrr mislabeledhs   zSELinuxGui.mislabeledcCs||sdSt|dd}t|d}d|_||dd||dd||dd||d|dd||d |dddS) NrrTr rr:rr)rrrrrrrt)rRtreerVrrrrrrrset_mislabeledps zSELinuxGui.set_mislabeledcCst||_|jD]}t|j|dkrD||jd|tdq|j|d}|j|dD]`}||f|jdvr|jd||fddkrq`||jd||fdkrq`||j|||q`qdS) Nrz all filesrrrrrr) rZget_writable_fileswritable_filesr]rrrr r\)rRrwriterrVrrrr~s z$SELinuxGui.writable_files_initializec Cs|d}|dur td}d}nh||f|jv}t|D],}||}||d||||||q8|r||}||}||}||d|||d|||d|||d|dS)NzMISSING FILE PATHFrrrr)rr rrZ find_filerrr) rRr}rVZ selinux_labelrrrprrrrrs"     z$SELinuxGui.files_initial_data_insertcCsd|S)Nz %srrRrrrrrszSELinuxGui.markupc Cs |rtddtdd|SdS)Nz$r&z^)resubrrrrunmarkupszSELinuxGui.unmarkupcCst||_|jD]}t|j|dkr.q|j|d}|j|dD]p}tj||jd}||f|jdvr|jd||fddkrqJ||jd||fdkrqJ||j |||qJqdS)Nrr)rrrrr) rZget_file_types file_typesr]rZget_descriptionrr\rr)rRrrSrrVdescrrrrs z'SELinuxGui.application_files_initializecCs,d}|jD]}t|j|dkr dSq dSr)r\r)rRrar^rrrmodifieds  zSELinuxGui.modifiedcCsZt|D]J}|D]@\}}||jdvr:|jd|d}t|}||||qq dS)Nrr)rZ get_boolsr\ boolean_descboolean_initial_data_insert)rRrblistrrr!rrrrs   zSELinuxGui.boolean_initializecCsR|j}|j|d||j|d||j|d||j|dtddS)Nrrrr r)r}rrr )rRrr!rrrrrr$s  z&SELinuxGui.boolean_initial_data_insertcCs^t|D]N}d}d}d}d|vr*|d}d|vr:|d}d|vrJ|d}||||q dS)Nrtargetsource)rZget_transitions_into$transitions_into_initial_data_insert)rRrrr executabler'rrrrsz&SELinuxGui.transitions_into_initializecCsd|j}|dkr0|j|dt|ddn|j|dd|j|d||j|d|dS)NrrDefaultr)rrrr )rRrr)r'rrrrr(s  z/SELinuxGui.transitions_into_initial_data_insertc Cst|D]}d}d}d}d|vr*|d}d|vr:|d}d|vrJ|d}||||z&|j|dD]}||||qhWq tyYq 0q dS)Nrr& transtypeZregex)rZget_transitions$transitions_from_initial_data_insertrKeyError)rRrrrr)r+Zexecutable_typerrrrs  z&SELinuxGui.transitions_from_initializecCs|jd}|dkr6|j|dd|j|ddn|j|}|j|dt|ddd}|ddr|j|dtd|n|j|dtd ||j|d|dd|j|dd |j|d||j|d |dS) Nrr*rFr)zz rz:To disable this transition, go to the %sBoolean section%s.z9To enable this transition, go to the %sBoolean section%s.Tr )rrrr r )rRrr)r+rrrrrrr,s   z/SELinuxGui.transitions_from_initial_data_insertcCsFt|D]6}d|vr |d}nd}||d|d|d|q dS)Nfilenamer&classr+)rZget_file_transitions%transitions_files_initial_data_insert)rRrrar.rrrrs  z'SELinuxGui.transitions_files_initializecCsZ|j}|j|d||j|d||j|d||dkrFd}|j|d|dS)Nrrr*r )rrr)rRrVtclassdestrrrrrr0s z0SELinuxGui.transitions_files_initial_data_insertcGs4|d|_d|_d|_d|_|jd|j|j d|j d|j d|j d|jr|jt|j|_|j d|jr||j|j d|j |j|j |j|j |j|jt|d|jkr|d}n |j}|tkr*|j|_td}n6|tkrF|j|_td}n|tkr`|j |_td}|j!"td||j#d |j$"td ||j#d |j"td ||j#d |j%r|j&|j d|jt'|d|j(kr|d}n |j(}|t)kr |j*|_td }|t+kr:|j,|_td }|j!"td|j#|d|j$"td|j#|d|j"td|j#|d|j-r|jt.|d|j/kr|d}n |j/}|t0kr|j1|_|t2kr|j3|_|t4kr|j5|_|j6r"|jt7|j8|j9rL|:|jt;|j8|j<r|jt=|j&|j d|j>|_|j!"td|j$"td|j"td|j?r|jt@|j&|j d|jA|_|j!"td|j$"td|j"td|jBr~|jtC|j&|j d|jD|_|j!"td|j$"td|j"td|j|_E|jr$|j8&|jF|_|jF|_|jF|_tGd|jHD]D}|jI|}|r|Jd}tK|tLjMr|jN||jOdq|jPQ|jddS)NFTrrr)writablerz4Add new %(TYPE)s file path for '%(DOMAIN)s' domains.)ZTYPEZDOMAINz3Delete %(TYPE)s file paths for '%(DOMAIN)s' domain.zModify %(TYPE)s file path for '%(DOMAIN)s' domain. Only bolded items in the list can be selected, this indicates they were modified previously.rzlisten for inbound connectionszMAdd new port definition to which the '%(APP)s' domain is allowed to %(PERM)s.)rZPERMzVDelete modified port definitions to which the '%(APP)s' domain is allowed to %(PERM)s.zMModify port definitions to which the '%(APP)s' domain is allowed to %(PERM)s.z%Add new SELinux User/Role definition.z.Delete modified SELinux User/Role definitions.z7Modify selected modified SELinux User/Role definitions.z!Add new Login Mapping definition.z*Delete modified Login Mapping definitions.z3Modify selected modified Login Mapping definitions.z$Add new File Equivalence definition.z-Delete modified File Equivalence definitions.zModify selected modified File Equivalence definitions. Only bolded items in the list can be selected, this indicates they were modified previously.)Rr#rtreesort treefilterr}rrrr rrrrhrirrr)rOrzrrrrr|rrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrxrrrr>rrr5rrrIrrrrZ get_columnZ get_cells isinstancerZCellRendererTextZ set_sort_func stripsortrZ unselect_all)rRrrcategoryrcolrrrrrD s                                                            zSELinuxGui.tab_changec Cs:|\}}||||}||||}t||Sr[)Zget_sort_column_idrr~r) rRrZrow1Zrow2Z user_dataZ sort_columnr rZval2rrrr8s zSELinuxGui.stripsortcCs|j|}|j|}|j|jtd|j |dt |j |j |d}|D]$}| |d|d|d|dq\||jdS)NzBoolean %s Allow Rulesrr'r&r/Zpermlist)r~rrrrrrr r}r~rZget_boolean_rulesrdisplay_more_detail_initr)rRwindowsrVitr%rrrrr{s   "zSELinuxGui.display_more_detailc Cs0|j}|j|dd|||d|fdS)Nrzallow %s %s:%s { %s }; )rrrr)rRr'r&Z class_typeZ permissionrrrrr;s z#SELinuxGui.display_more_detail_initcGsd|_|jtkrJ|jtd|j|jtd|j| |dS|jt kr|j td|j|j td|j| ||j}|tkr|jdn |jdd|_|jtkr|jtd |jtd ||d|_|jtkr2|jtd |jtd ||d|_|jtkr|jd |jd |jtd|jtdd|_| |j|!dS)NFzGAdd Network Port for %s. Ports will be created when update is applied.zAdd Network Port for %szMAdd File Labeling for %s. File labels will be created when update is applied.Add File Labeling for %szex: /usr/sbin/Foobarzex: /var/lib/FoobarTzGAdd Login Mapping. User Mapping will be created when Update is applied.zAdd Login MappingzQAdd SELinux User Role. SELinux user roles will be created when update is applied.zAdd SELinux Usersr&zMAdd File Equivalency Mapping. Mapping will be created when update is applied.zAdd SELinux File Equivalency)"rrrrrLr rrarinit_network_dialogr|rr`init_files_dialogrrrr^rrrr8login_init_dialogrrr;user_init_dialogrrGrHrFrKr new_updatesrrrrr7sB              zSELinuxGui.add_button_clickedcCs||_|dSr[)rr)rRrrrrrszSELinuxGui.show_popupcGs|j|jddSr)rr rrrrrrr)s  zSELinuxGui.close_popupc Gsd}|jr&|}|s&|jddSd|_|jtkr@|||jtkrZ|j t d|j |j t d|j d|_||d|_d}d}|j}|tkr |j|}||_|j|d}|j ||j|d}|dkr||j||j|d}|dkr ||j||tkr|j|}||_|j|d}|j ||j|d} | dkr|||j| |j|d}|dkr||j||tkrZ|j |}||_|j!|d}|j |z&|j!|d} | "d d"d } Wnt#yYn0|j!|d} | dkr:||j| | d}|dkrZ||j||jt$kr|%||j& |j'|d|j( |j'|d|j) |j'|d ||j*|j'|d|j+ t d |j,t d |-|j,|jt.kr||/||j0 |j1|d|j2 |j1|d||j3|j1|d|j4 t d|j5t d|-|j5|jt6kr|j7 |8|j9|d|j: |8|j9|d|j; t d|j<t dd|_=|-|j<dS)NFTzPModify File Labeling for %s. File labels will be created when update is applied.r?Modifyrrrzzr zUModify SELinux User Role. SELinux user roles will be modified when update is applied.zModify SELinux UserszLModify Login Mapping. Login Mapping will be modified when Update is applied.zModify Login MappingzPModify File Equivalency Mapping. Mapping will be created when update is applied.zModify SELinux File Equivalency)>rryrrrrrmodify_button_network_clickedr|rrLr rr`rdelete_old_itemrArrrrtrrr~r^rrbrcrrurrrvrrtrrrCr@r<rBrCr?rr;rrrBr2r6r4r1rr8rrGrrJrHrFrKr) rRrr operationrrrVftyper2rZget_typerrrr9s                           z SELinuxGui.modify_button_clickedcGsB|j|}|j|d}||j|||j|jdSr) rrr~rrbrr`rSr )rRrlocrrrIrrrr=s   zSELinuxGui.populate_type_combocCs.|dkr dS|drd}nd}||dS)NZ _script_tZ_tr)endswithrt)rRrXZ split_charrrr strip_domainDs  zSELinuxGui.strip_domaincCs|D]}||rdSqdS)NTF) startswith)rRr exclude_listrUrrr exclude_typeMs zSELinuxGui.exclude_typec Gsg}|jd||j|j}|j|j| |j }|j D]B}|d |rL|d|j krL|d dsL| | |dqL|jztjD]$}|j }|j|dtj|q|tkrL|jdkrL|jD]D}| |r|j }|j|d||j }|j|d|q|jd|jdn|tkr|jdkr|jD]`} | |r|| |s| |jvr|j }|j|d| |j }|j|d| ql|jdn|tkrh|jdkrhtD]`} | |r| |r>|| |s>|j }|j|d| |j }|j|d| q|jdWntytdYn0|jd|j d|j }|j|dt!ddS) NTrZ httpd_sysrFrrr)"rcrrr`rrrrrrLrrrMrrr file_type_strrrr r]rkrrrOr rZget_all_file_typesrrrbrerLr ) rRrrNrZcomparedfilesrrrrSrrrrASs`       *       &         zSELinuxGui.init_files_dialogcGs|}|s|jddS|jtd|j|jtd|jd|_ | |d}d}d|_ |}|j |d}|j||j |d}|dkr|jdn|d kr|jd|j |d }|dkr||j|||_ dS) NFzJModify Network Port for %s. Ports will be created when update is applied.zModify Network Port for %srErTrrrr)ryrrrrLr rrarrGr@rr}r~r_rrkrrr)rRrrrHrrrrrrrrFs.    z(SELinuxGui.modify_button_network_clickedc Gs||j|j}|j|jdz,|tkrPt j j |j dddd}n8|t krt j j |j dddd}|t j j |j dddd7}g}|D]<}||D].\}}||dd gvr|d rq||qq|||j }|d d kr|dd }|d }d} d} |D]8}||r&| } |j} |j| d|| d7} q|j| WntynYn0|jd|jddS)Nr&rrTrrrZport_tZunreserved_port_tZ_typerrQr rrr)rrarrrrr_rLrrrrrrr]rKrrrLrMrrrkrrrg) rRrrrZ port_typesr^rrZ short_domainr`foundrrrrr@sF             zSELinuxGui.init_network_dialogcGsJ||}|jdkrFtD]$}||dkr |j|ddq dSNr&rr)rr4rrrrLr )rRcomborrrrrrr*s    z'SELinuxGui.login_seuser_combobox_changecGsJ||}|jdkrFtD]$}||dkr |j|ddq dSrT)rrCrr get_all_rolesrLr )rRrUrZserolerrrrr+s    z%SELinuxGui.user_roles_combobox_changecCsNd}|jsdS|j}|s dS|\}}|rJ||}|rJ|j|}|Sr[)rrrrr6)rRrrr5rrrrys    zSELinuxGui.get_selected_itercGsb|jd|}|dkr,|jddS|j|rD|j|dsHdS|j|j|ddS)NFr)rrryr})rRrrrrrrs  zSELinuxGui.cursor_changedcGsj||j|jt}||D]"}|j}|j|dt |q*|j d|j ddSNrr&) rr8rrrZ get_all_usersrrrrr2rLr4)rRrrrrrrrrBs    zSELinuxGui.login_init_dialogcGsj||j|jt}||D]"}|j}|j|dt |q*|j d|j ddSrW) rr;rrrrVrrrrr@rLrC)rRrrrrrrrrCs    zSELinuxGui.user_init_dialogc Csj|jrfd|}|z|j|Wn2tjjy\}z||WYd}~n d}~00|dS)Nzboolean -m -%d deny_ptrace) rrrsrsemanagerrrru)rR checkbutton update_bufferrUrrrr s  zSELinuxGui.on_disable_ptracecs|jfdd}g}|jtkrd|s8||jS|jD]$}|d|jdvr>|||q>|jt kr|j }|s|t kr| |jS|tkr||jS|tkr||jS|jD](}|d|df|jdvr||q|jtkrF|s||jS|jD]0}|d|df|jdvr|||q|jtkr|d ksh|S|jD](}|d|jd vrn|||qn|jtkr|s|S|jD](}|d|jd vr|||q|jtkr8|d ks|S|jD](}|d|jd vr|||q|j|D]6}|j}tdD]}|j||||q^qFdS) Ncs&g}tdD]}|||q|Sr)rr)rlrarWrrdup_rowsz1SELinuxGui.on_show_modified_only..dup_rowrrrrrrTrr!r )r}rrrzrrrr rr|rrrrrrrrrrrrrrrrrrr)rRrYr]Z append_listrrrrarr\rr:sd                         z SELinuxGui.on_show_modified_onlyc Cs8|d}||d|||d|||d|dSNrrrr) rRrrSrrHrVZfclassrIrrrrinit_modified_files_liststoreWs z(SELinuxGui.init_modified_files_liststorecGs tddS)Nzrestore to default clicked...rrrrrrestore_to_default]szSELinuxGui.restore_to_defaultcGs(||j|jd|jddSr)rEr,r`rrarrrrr`s  zSELinuxGui.invalid_entry_retrycCsVt|dks|ddkrR|j|jd|jd|jtd|dSdS)NrrFzAThe entry '%s' is not a valid path. Paths must begin with a '/'.T) rr,rr`rrar-rLr )rRZ insert_txtrrrerror_check_fileses   zSELinuxGui.error_check_filescCslz t|}|dks|dkrtWnFtyf|j|jd|jd|jt dYdS0dS)NriFz'Port number must be between 1 and 65536T) int ValueErrorr,rr`rrar-rLr )rRrZpnumrrrerror_check_networkns    zSELinuxGui.error_check_networkcGs2|jr.||jtdkr.|j|jdS)Nr)rrrbr r`r rSrrrrrrC{s zSELinuxGui.show_more_typesc Gs |||j}|j}|j}|jr|}|j |d}|j |d}|j |d}|j |d||j |d||j |d|d|||||d|j d|<n"|j d}d||d|j d|<|j |d||j |d||j |d||dS) Nrrr-m)rrroldrange oldseuseroldnamer -a)rrr)r)rr1r4rr2rryr6r~r}rr\rrD) rRrr mls_rangerrrhrgrfrrrrs&    zSELinuxGui.update_to_loginc Gsj|||j}|j}|j}|j}|jr|}|j |d}|j |d}|j |d} |j |d} |j |d||j |d||j |d| |j |d| d|||| | ||d|j d|<nD|j d}|s|r d|||d |j d|<nd|d |j d|<|j |d||j |d||j |d||j |d||dS) Nrrr rre)rrrrrfoldleveloldrolesrhr!ri)rrrr)rr)r)rr?rBrrCr@rryr<r~r}rr\rrD) rRrrrrjrrrhrlrkrfrrrrs2    "  zSELinuxGui.update_to_usercGs||j}|j}|jrl|}||j|d}||j|d}d|||d|j d|<n |j d}d|d|j d|<|j|d| ||j|d| |dS)Nrrre)rsrcoldsrcolddestrrirrm) r)rHrrGrryrr}rr\rr)rRrr3rmrrornrrrrs   zSELinuxGui.update_to_file_equivc Gs0|d|_|j}||r&dS||j}|j}||j}|j r| }| |j |d}| |j |d}|j |d} d|||| d|jd||f<n$|j d}d|d |jd||f<|j |d|||j |d|||j |d||d |_|jd |dS) NTrrrre)rroldtypeoldpathZoldclassrrirrF)r)rr^rrarrbrercrryunmarkr}r~rr\rrrrkrD) rRrrVsetyperr2rrr oldsetypeZ oldtclassrrrrs,        zSELinuxGui.update_to_filesc Gs2d|_|j}||rdS|jr.d}nd}||j}|j}|j r| }| |j |d}| |j |d}| |j |d} d||| ||d|jd ||f<n&|j d}d ||d |jd ||f<|j |d||j |d||j |d|d |_|j|jd|dS) NTrrrrrre)rrrrq oldprotocololdportsrri)rrrF)rr_rrdrrrrrgrryrtr}r~rr\rrar rrrD) rRrrrrurrrxrwrvrrrrs0     "   zSELinuxGui.update_to_networkc Gsd}|jd|jtkr|j|jd}|D]R\}}|||fd}|j}|j|d||j|d||j|d|q2| |j dS|jt kr$|j |jd}|D]X\} } || | fd}|j }|j |d| |j |d||j |dt j| q| |jdS|jtkr|j|jd } | D]|} | | d } | | d d }| | d d }|j}|j|d| |j|d| |j|d||j|d|qH| |jdS|jtkrh|j|jd}|D]\}||d}||d d }|j}|j|d||j|d||j|d|q| |jdS|jtkr|j|jD]N}|dr|j}|j|d||d|j|d||dq| |jdSdS)NZAddFrrrrr rr!rrr&rrr rr)rrrrrrrr rrrrpr|rorrPrmrrDr rErr9r:rrLrJrrM)rRrrHZ port_dictrrrurZ fcontext_dictrVr2Z user_dictr!rrrZ login_dictr rrrrrr8sv                               z SELinuxGui.delete_button_clickedcGsd||jtkrJ|jD]0}|drd|dd|jd|d|df<q|jtkr|jD]4}|drZd|dd|jd|dt|df<qZ|jtkr|j D].}|drd|d|d d |jd |d<q|jt kr|j D]4}|drd|d|d|dd |jd |d<q|jt krX|j D],}|dr*d|dd|jd|d<q*|dS)Nrrr rsrrrrr)rrrr!)rr rrr rpr)r)rrrrr\r|roreverse_file_type_strrrDrr9rrLrDrRrdeleterrrrDs,  &  *  $  *    z!SELinuxGui.on_save_delete_clickedcGs(|jD]}t|d|d|dqdSr^)rorrzrrr!on_save_delete_file_equiv_clicked\s z,SELinuxGui.on_save_delete_file_equiv_clickedcCs||d ||d<dSrr)rRrrVrrrrr`szSELinuxGui.on_toggle_updatecCsTd}|D]F}|d|dkrF|d|dkrF||}||dS|d7}qdS)Nrrr)rr)rRr}rr`rrrrr ipage_deletecs   zSELinuxGui.ipage_deletecCs|sdS|j|}|j|}||d}||d||d ||d}||jdvrl|jd|=nd|i|jd|<|dS)Nrrrr)r~rrr~rr\rD)rRrrVrrrrrrrrls    zSELinuxGui.on_togglecGs||_|jdSr[)rrrrefilter)rRentryrrrrr/zs z#SELinuxGui.get_advanced_filter_datacGs||_|jdSr[)rrr6r~)rRr<rrrrr~s zSELinuxGui.get_filter_datacGs$d|_|j|jdD]}|jd|d}|jd}|j|dd|j|dt||j|dt|jd|d|j|dd|j|}|j|dt d ||j|dd q|jd D]~\}}|jd ||fd}|jd ||fd }|jd}|j|dd|j|d||j|dd|d krj|j|dt d|j |dkr|j|dt d|j |dkr|j|dt d|j |j|}|j|dd |j|dt d||j|}|j|dd |j|dt dtj ||j|}|j|dd |j|dt d|q|jdD]z\} } |jd| | fd}|jd}|j|dd|j|d||j|dd|d kr|j|dt d|j |dkr|j|dt d|j |dkr(|j|dt d|j |j|}|j|dt d| |j|dd |j|}|j|dt d| |j|dd |jd| | fd }|j|}|j|dd |j|dt d|q`|jdD]r} |jd| d}|jd}|j|dd|j|d||j|dd|d krZ|j|dt d|dkrx|j|dt d|dkr|j|dt d|j|}|j|dt d | |j|dd |j|}|j|dd |jd| d!} |j|dt d"| |jd|  d#d$} |j|}|j|dd |j|dt d%| q|jd&D]r}|jd&|d}|jd}|j|dd|j|d||j|dd|d kr|j|dt d'|dkr|j|dt d(|dkr|j|dt d)|j|}|j|dd |j|dt d*||j|}|j|dd |jd&|d+}|j|dt d,||jd&| d#d$} |j|}|j|dd |j|dt d%| qh|jd-D](}|jd-|d}|jd}|j|dd|j|d||j|dd|d krZ|j|dt d.|dkrx|j|dt d/|dkr|j|dt d0|j|}|j|dd |j|dt d1||j|}|j|dd |jd-|d2}|j|dt d3|q| |jdS)4NTrrrrrrr zSELinux name: %sFrrrizAdd file labeling for %srzDelete file labeling for %srezModify file labeling for %sz File path: %szFile class: %szSELinux file type: %srzAdd ports for %szDelete ports for %szModify ports for %szNetwork ports: %szNetwork protocol: %sr!zAdd userz Delete userz Modify userzSELinux User : %srz Roles: %srr&zMLS/MCS Range: %sr zAdd login mappingzDelete login mappingzModify login mappingzLogin Name : %srzSELinux User: %srzAdd file equiv labeling.zDelete file equiv labeling.zModify file equiv labeling.zFile path : %srmzEquivalence: %s)r rrr\rrrr#rr rrPr rr[)rRrZboolsrHrrrVr2rurrr!rrr rrmrrr update_guis  "                                   zSELinuxGui.update_guicCsL|jr|j|_|jr$|j|_|jr6|j|_|jrH|j|_dSr[)rrrrrrrrrrset_active_application_button s    z(SELinuxGui.set_active_application_buttonTcCs~|j|jd|jd|jd|jd|jd|jd|j d|j d|rz|j ddS)NFr&) rr rrrrrrrrrrrL)rRrrrrrN s         zSELinuxGui.clearbuttonscCsP||jd|jd|jtd|jd|| dS)NTZSystem) rNrrrr+rKr rkrDr rrrrrJ" s   zSELinuxGui.show_system_pagecGsX|||jd|jtd|||j d|j ddS)NTzFile Equivalence) rNrrrkr+rKr rDr rrrrrrrr$+ s  zSELinuxGui.show_file_equiv_pagecCsx||jd|jd|jtd|jd|| | | |j d|j ddS)NTZUsers)rNrrrr+rKr rkrDrrr rrrrrrrshow_users_page5 s    zSELinuxGui.show_users_pagecCsZ|d|jd|jd|jd|jd|jd||dSNFT) rNrrrrrrkrDr rrrrrMB s      z!SELinuxGui.show_applications_pagecGs |dSr[)rJrrrrr%L szSELinuxGui.system_interfacecGs |dSr[)rrrrrr&O szSELinuxGui.users_interfacec Gsg}d}|j}|dkr|jD]T}|j|}|j|}|j|}|dkr$|j|ddkrp| ||d7}q$|D]}|j |q~nT|j dkr|j |t kr||j n*|tkr||j n|tkr||j dS)NrTrFr)rrrr}r5rrr6r~rrrrrrrrrr) rRrYrZiterlistr`rrrZitersrrrr'R s,          z SELinuxGui.show_mislabeled_filescCspt|ddd}t|dddd}|jtd|||dddtjjkrl|j || dS) NrrrrzbRun restorecon on %(PATH)s to change its type from %(CUR_CONTEXT)s to the default %(DEF_CONTEXT)s?)PATHZ CUR_CONTEXTZ DEF_CONTEXTzrestorecon dialog)title) rrrtrverifyr r ResponseTypeZYESrZ restoreconr6)rRrVrrrrrrk s & zSELinuxGui.fix_mislabeledcGs$|j||j|dSr[)rrr"rrrrrrDr szSELinuxGui.new_updatescGsF||tdk|_|jr2|jtdn|jtddS)NZUpdatezUpdate ChangeszRevert Changes)r get_labelr r r[rrRr rrrrr.v s z#SELinuxGui.update_or_revert_changescGsb||jr|n|d|_||jd|_|| | |j dSr) r)r update_the_system revert_datarrFrrr#r6rDrrrrrrr-~ s z%SELinuxGui.apply_changes_button_pressc Gsn||}|z|j|Wn0tjjyX}zt|WYd}~n d}~00|| dSr[) r) format_updatersrrXrrrrur)rRrrZrUrrrr szSELinuxGui.update_the_systemcCs2dddddd}|D]}||kr||SqdS)Nrrr)zExecutable FileszWritable FileszApplication File TypeZInboundZOutboundZBooleansr)rRlookupZ ipage_valuesvaluerrripage_value_lookup s zSELinuxGui.ipage_value_lookupcCs4|dd}|dd}|dkr,||_n|SdS)Nz: rrz SELinux name)rtZ bool_revert)rRZ attributeZbool_idrrrget_attributes_update s z SELinuxGui.get_attributes_updatec Csf|d}|jD]L}|dvrN|j|D]"}|d|j||d|f7}q*|dvr |j|D]}|j||ddkr|d|7}qbd |j||vr|d |j||d|j||d |j||d |f7}qb|d |j||d|j||d |f7}qb|d vr|j|D]}|j||ddkrJ|d|7}nd|j||vrd |j||vr|d|j||d|j||d|j||d |j||d|f7}n.|d|j||d|j||d|f7}q |dvrd|j|D]Z}|j||ddkr2|d|7}n.|d|j||d|j||d|f7}q|dvr|j|D]j}|j||ddkr|d|7}n>|d|j||d|j||d|j||d|f7}qx|dvr|j|D]h\}}|j|||fddkr,|d||f7}n0|d|j||d|j||d||f7}qq|S)Nr&rzboolean -m -%d %s rr rrz login -d %s rzlogin %s -s %s -r %s %s rzlogin %s -s %s %s r!z user -d %s rzuser %s -L %s -r %s -R %s %s rzuser %s -R %s %s rzfcontext -d %s zfcontext %s -e %s %s rmrzfcontext %s -t %s -f %s %s rr/rzport -d -p %s %s zport %s -t %s -p %s %s )rr\) rRrZr^rr[rrrrrrrr sH   @0 (P2 2 B6zSELinuxGui.format_updatecCsXd}g}d}|jD]$}|j|ds.|||d7}q||D]}||qDdS)Nrr&r)rrreverserc)rRr`Z remove_listrZrrrrr s   zSELinuxGui.revert_datacGsN|tdk}|r$|tdn|td|j||j|dSr_)rADVANCED_LABELrLrrrUrRlabelrZadvancedrrrrB s  z!SELinuxGui.reveal_advanced_systemcGsf|tdk}|r$|tdn|td|j||j||j||j|dSr_)rrrLrdrrerfrgrrrrr s   zSELinuxGui.reveal_advancedcGsF|tdkr(|td|n|td||jdSr)rADVANCED_SEARCH_LABELrLr)rr.)rRrrrrrr s  z)SELinuxGui.on_show_advanced_search_windowcCsJ|r&|j|jtd|jdn |j|jtd|jddS)NzSystem Status: EnforcingTzSystem Status: Permissive)rrfrr rrkr)rRrrrrrh s zSELinuxGui.set_enforce_textcCs,|js dS|j|||dSr[)rrZ setenforcerrhrRr rrrr  szSELinuxGui.set_enforcecGs`|j}|dkrdSd|_|j|j||jdkrH||n|jdkr\||dS)NFImportExport) r get_filenamerr r^rLr import_config export_config)rRrr.rrrr s      zSELinuxGui.on_browse_selectcGsX|j}|jr0|dsT|j|dn$|drT|dd}|j|dS)N(/.*)?r)r^rrrrKrLrt)rRrrVrrrr s    zSELinuxGui.recursive_pathcGs"|}|jr|dd|_dSNr&F)rrrL)rRZ entry_objrZtxtrrrr! s zSELinuxGui.highlight_entry_textcCsv|}|dkrdS|dr*|jdtjD]@}||r0|jD]*}|dtj|rD||j |dqDq0dS)Nr&rTr) rrKrrkrZ DEFAULT_DIRSrMrrrb)rRrtextrQrrrrr' s     z#SELinuxGui.autofill_add_files_entrycGs&|jd|_|j}|j}dSr)rZget_colZboolean_column_1Z get_widthZget_cell_renderers)rRrwidthZrendererrrrr53 s zSELinuxGui.resize_columnscGs|jdSr[)rrrrrrr(8 szSELinuxGui.browse_for_filescGs|jdSr[)rr rrrrr,; szSELinuxGui.close_config_windowcGsl|j|jkrdS|tdtjjkr<|j|jdS|j | |j|j d|j|_dS)NzChanging the policy type will cause a relabel of the entire file system on the next boot. Relabeling takes a long time depending on the size of the file system. Do you wish to continue?T) rrUrrr rrNOrkrr?rrelabel_on_bootrrrrr?> s z SELinuxGui.change_default_policycCs4|js dS|||r0|j|dSr[)renabled_changedrrr@rrrrrrr@J s  zSELinuxGui.change_default_modecGs0|jtjj|jd|jd|_dS)NzImport Configurationr)r set_actionrFileChooserActionZOPENrrrrrrrr;Q s  zSELinuxGui.import_config_showcGs0|jtjj|jd|jd|_dS)NzExport Configurationr)rrrrZSAVErrrrrrrr<X s  zSELinuxGui.export_config_showcCs:||j}t|d}||||dS)Nw)rsrrrrrru)rRr.rrrrrr^ s    zSELinuxGui.export_configcCsRt|d}|}||z|j|WntyDYn0|dS)Nr)rrrrsrrXreru)rRr.rrrrrrf s  zSELinuxGui.import_configc CsV|||f|vri||||f<||f||||fvrR||| | d||||f||f<dS)N)rrchangedoldr) rRrYrSrrHrqrIrrrrrrinit_dictionaryq szSELinuxGui.init_dictionarycCs*|dd}|dkrdS|dkr&dSdS)N-r0F1T)rt)rRrrrrtranslate_boolw s zSELinuxGui.translate_boolc Gsv|j}tjd}|r"|r"dS|s.|s.dSz|j|Wn2tjjyp}z| |WYd}~n d}~00dS)Nrd) rrrirVrjrrrrr)rRrrrjrUrrrrA~ s  zSELinuxGui.relabel_on_rebootcGs ||jd|jd|j|krV||j||j t dkrV|j d|j |kr|j rt||jn|j r||j|js|jr|jd|jd|jd|jd|jd|jd|jtdkr|jtddS)NFTrrr)r rrkrrrSrr`rrbr r,rrrardZ get_visiblerfrrrerrgr*rrrL)rRrrrrrrE s,             zSELinuxGui.closewindowcCs|j|j|dSr[)r get_window set_cursorrr rrrrrs szSELinuxGui.wait_mousecCs|j|j|dSr[)rrrrr rrrrru szSELinuxGui.ready_mouser&cCsNtddtjjtjj|}|||tjj | | }| |Sr) r MessageDialog MessageTypeINFO ButtonsTypeZYES_NOr set_positionWindowPositionMOUSEshow_allrundestroy)rRmessagerdlgrcrrrr s zSELinuxGui.verifycCsDtddtjjtjj|}|tjj| | | dSr) rrrZERRORrZCLOSErrrrrr)rRrrrrrr szSELinuxGui.errorcCs|s dS|}|dkrH|jtkrH|tdtjjkrH|j d|dkr||jtkr||tdtjjkr||j d||_ dS)NrpaChanging to SELinux disabled requires a reboot. It is not recommended. If you later decide to turn SELinux back on, the system will be required to relabel. If you just want to see if SELinux is causing a problem on your system, you can go to permissive mode which will only log errors and not enforce SELinux policy. Permissive mode does not require a reboot. Do you wish to continue?TzChanging to SELinux enabled will cause a relabel of the entire file system on the next boot. Relabeling takes a long time depending on the size of the file system. Do you wish to continue?) rrrrrr rrrrrk)rRZradiorrrrr s  zSELinuxGui.enabled_changedcGs|jd|jddSr)rrLrrkrrrrr# s zSELinuxGui.clear_filterscGsB|js dS||jr*|jdn |jd|dS)Nzmodule -e unconfinedzmodule -d unconfined)rrsrrrrXrurrrrr= s  zSELinuxGui.unconfined_togglecGsB|js dS||jr*|jdn |jd|dS)Nzmodule -e permissivedomainszmodule -d permissivedomains)rrsrrrrXrurrrrr> s  zSELinuxGui.permissive_togglecGs:t|jdkr.|tdtdtjjkr.dS|dS)Nra0You are attempting to close the application without applying your changes. * To apply changes you have made during this session, click No and click Update. * To leave the application without applying your changes, click Yes. All changes that you have made during this session will be lost.zLoss of data DialogT)rrrr rrrrrrrrr! szSELinuxGui.confirmation_closecGstddSr)sysexitrrrrr szSELinuxGui.quit)NF)T)r&)__name__ __module__ __qualname__rZrrcrGrxr"r rrr3r4r2r rrrrrrrrrrrrrrrr1r0rr6rPrFrrrrrrrrr"rr$rr(rr,rr0rDr8r{r;r7rr)r9rrLrOrArFr@r*r+ryrrBrCrr:r_r`rrardrCrrrrrr8rr|rr}rr/rrrrNrJr$rrMr%r&r'rrDr.r-rrrrrrBrrrhr rrrrr5r(r,r?r@r;r<rrrrrArErsrurrrr#r=r>r!rrrrrr%ts(  @       B*   } )Y 5+    D  A       /                r%__main__)AZgiZrequire_versionZ gi.repositoryrrrZsepolicy.sedbusrrrrrrrZsepolicy.networkZsepolicy.manpagerrir unicodedataZPROGNAMEgettextkwargs version_info translationrr builtinsr__dict__ ImportErrorZ __builtin__r ryrPrr rrrrrrrrrrrrrrzr|rrrrrrrrr]rgr%rrrrrrs