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 {h @sgdZddlZddlZddlZddlZddlZdddddZdgd gd d gd gd gdgdZdgZe de e ej deZdad,ddZdadaddZdaddZdaddZdaddZdaddZdad d!Zd"d#Zd$d%Zd&d'Z Gd(d)d)Z!Gd*d+d+Z"dS)-)ManPage HTMLManPages gen_domainsN)Zamavis_tZclamd_tZ clamscan_tZ freshclam_t)Z rgmanager_tZ corosync_tZ aisexec_tZ pacemaker_tZqemu_tZphpfpm_t)Z antivirus_tZ cluster_tZsvirt_tZhttpd_tZsambaZapacheZvirtZlibvirtZbindZsmartmonZraid)ZsmbdZhttpdZvirtdZnamedZfsdaemonZmdadmz/varz%y-%m-%dSOURCE_DATE_EPOCH#/usr/share/selinux/devel/policy.xmlcCstrtSddl}iaz|jjt|}|dD]b}|dD]R}|d}|dksB|dkrbqB|dkrnd}|dkrzd}|d D]}|j t|<qqBq4Wnt yYn0tS) NrZlayermodulenameuserZ unconfinedZ unprivuserZunconfineduserZsummary) modules_dictZxml.etree.ElementTreeZetreeZ ElementTreeZ fromstringsepolicyZ policy_xmlfindallgettextIOError)pathZxmlZtreelmrbr4/usr/lib/python3.9/site-packages/sepolicy/manpage.pygen_modules_dict/s(  rcCstrtrttfSgaiag}ttj}|D]4}||dd|vr,|dt|ddd<q,|D]}|dvrft|ddqftttfS)Nrrange_r)Zsystem_urootZ unconfined_uZ_u) users users_ranger infoZUSERappendsplitreplacesort)ZallusersZ allusers_infodurrrget_all_users_infoKs r$cCststttjddatSNZ entry_typetypes)all_entrypointsnextr r ATTRIBUTErrrrget_entrypointscsr*cCstrtSgatD](}d}|dd}|tvr2qt|qtD]0}|ddtvsF|dkrdqFt|ddqFttS)NFZsystem_r)domainsr get_all_domainsr get_all_rolesr!)r"founddomainrolerrrrls    rcCs"tdurtttjddatS)NZ exec_typer&) exec_typesr(r rr)rrrr_gen_exec_typessr3cCs"tdurtttjddatSr%) entry_typesr(r rr)rrrr_gen_entry_typessr5cCsTtrtSttj}ia|D]2}z|dt|d<Wqgt|d<Yq0qtS)N attributesr)r&r rTYPE)Z all_typesZrecrrr _gen_typess r8cCsd|dt| dS)N r)joinlenr)fZtrimrrr prettyprintsr=cCsbttjg}tjD]H}g}|D].}|ddd|kr ||ddq t|||<q|S)N/r)dictfromkeysstring ascii_lettersrrsorted)Z manpage_listZalphabet_manpagesiZtempjrrrget_alphabet_manpagess rGcCsrzddlm}Wnty.ddlm}Yn0|d|\}}|dkrnt|dt|d}|||dS)Nr)getstatusoutputz)/usr/bin/groff -man -Thtml %s 2>/dev/nullzhas been createdw)ZcommandsrH ImportError subprocessprintopenwriteclose)Z html_manpageZmanpagerHrcoutputfdrrrconvert_manpage_to_htmls    rSc@s8eZdZdZddZddZddZdd Zd d Zd S) rzF Generate a HTML Manpages on an given SELinux domains cCs8t||_t||_||_|d|_|j|_|dS)Nr>)rG manpage_rolesmanpage_domains os_versionold_pathnew_path _HTMLManPages__gen_html_manpages)selfrTrUrrVrrr__init__s    zHTMLManPages.__init__cCs|||dSN)_write_html_manpage _gen_index_gen_cssrZrrrZ__gen_html_manpagessz HTMLManPages.__gen_html_manpagescCstj|jst|j|jD]<}t|r$|D]*}t|j| dddd|j |q4q$|j D]<}t|rl|D]*}t|j| dddd|j |q|qldS)N_selinuxrz.html) osrisdirrXmkdirrUvaluesr;rSrsplitrWrT)rZr0r"r1rrrrr]s *z HTMLManPages._write_html_manpagec Cs~|jd}t|d}|d|j|jD]$}t|j|r*|d||fq*|dd}|jD]N}t|j|rd|d7}|j|D](}|dd d }|d ||||f7}qqd|d ||jD]$}t|j|r|d ||fq|dd}|jD]T}t|j|r|d7}|j|D]*}|dd d }|d||||f7}q(q|d||t d|dS)Nz index.htmlrIz SELinux man pages

SELinux man pages for %s


SELinux roles

z %sz
rz

rarbrzo%s_selinux(8) - Security Enhanced Linux Policy for the %s SELinux user zH%s


SELinux domains

z %s zv%s_selinux(8) - Security Enhanced Linux Policy for the %s SELinux processes z%s %s has been created) rXrMrNrVrTr;rgrUrOrL) rZhtmlrRZletterZ rolename_bodyrhZrolenameZdomainname_body domainnamerrrr^sN         zHTMLManPages._gen_indexcCs6|jd}t|d}|d|td|dS)Nz style.cssrIaQ html, body { background-color: #fcfcfc; font-family: arial, sans-serif; font-size: 110%; color: #333; } h1, h2, h3, h4, h5, h5 { color: #2d7c0b; font-family: arial, sans-serif; margin-top: 25px; } a { color: #336699; text-decoration: none; } a:visited { color: #4488bb; } a:hover, a:focus, a:active { color: #07488A; text-decoration: none; } a.func { color: red; text-decoration: none; } a.file { color: red; text-decoration: none; } pre.code { background-color: #f4f0f4; // font-family: monospace, courier; font-size: 110%; margin-left: 0px; margin-right: 60px; padding-top: 5px; padding-bottom: 5px; padding-left: 8px; padding-right: 8px; border: 1px solid #AADDAA; } .url { font-family: serif; font-style: italic; color: #440064; } ri)rWrMrNrOrL)rZZ style_cssrRrrrr_)s    9zHTMLManPages._gen_cssN) __name__ __module__ __qualname____doc__r[rYr]r^r_rrrrrs Grc@s6eZdZdZdZddgZgZgZdLdd Zd d Z d d Z ddZ ddZ ddZ ddZddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Z d:d;Z!dd?Z#d@dAZ$dBdCZ%dDdEZ&dFdGZ'dHdIZ(dJdKZ)dS)MrzK Generate a Manpage on an SELinux domain in the specified path NZDisabledZEnabled/tmpr>FcCs||_||_||_td|_t|_t|_ t |_ t |_ t|_t|_td|_td|_t|_t|_t|_t|_t|_|jr|jd|_n|jt !|_t"|j|_#t$j%|dd||_&|jr|jd|_'n |jd|_'t(|j'|_)t*|\|_+|_,|j+d|_-|.d ||j+f|_/t0|j/d |_1|j+d |jvr|2|jr|j34|j/n|jr|j54|j/|6|j17t89D],}||j+krt8|D]}|:|qАqdS) NrrbZ file_contextsT)exist_okz policy.xmlr_t%s/%s_selinux.8rI_r);rj source_filesrr Z gen_port_dictportrecsrr,r- all_domainsZget_all_attributesall_attributesZ get_all_boolsZ all_boolsZget_all_port_typesall_port_typesr.Z all_rolesr$ all_usersall_users_rangeZget_all_file_typesall_file_typesZget_all_role_allows role_allowsr8r&r3r2r5r4ZfcpathselinuxZselinux_file_context_pathZ get_fcdictfcdictrcmakedirsrxmlpathZ gen_bool_dict booleans_dictZgen_short_namerk short_nametype _gen_bools man_page_pathrMrR_ManPage__gen_user_man_pagerTrrU_ManPage__gen_man_pagerO equiv_dictkeys_ManPage__gen_man_page_link)rZrkrrrurjkaliasrrrr[ssX               zManPage.__init__cCsg|_g|_|jg}|jtvrJt|jD] }|d|jvr(||dq(|D].}t|\}}|j|7_|j|7_qN|j |j dS)Nrr) bools domainboolsrrkrrwrr Z get_boolsr!)rZr&trrrrrrs  zManPage._gen_boolscCs|jSr\)rr`rrrget_man_page_pathszManPage.get_man_page_pathcCs|jd|_|jst|j|_z|j|j|_Wnd|j|_Yn0|j|jvrtt tj |j d|_ | |||||||n||||||dS)Nrtz %s user roler6)rkr1r rrdescrzr(r rr7rr6 _user_header_user_attribute _can_sudo_xwindows_login_network _booleans _home_exec _transitions _role_header _port_types _mcs_types_writes_footerr`rrrZ__gen_user_man_pages.    zManPage.__gen_user_man_pagecCsLd|j|f}td|j|fd|_|jd|j|jt|dS)NrsrIz.so man8/%s_selinux.8)rrMrRrNrkrOrL)rZrrrrrZ__gen_man_page_links  zManPage.__gen_man_page_linkc Csg|_i|_g|_||jD]x}z||_|jdkr:|jd|j|jf|j|jdS)Nrz .SH BOOLEANS SELinux policy is customizable based on least access required. %s policy is extremely flexible and has several booleans that allow you to manipulate the policy and run %s with the tightest access possible. )rrrRrNrkr`rrrrRs    zManPage._booleanscCsg}ddg}d}|jD]}d|j|vr||qt|rv|jd|D]$}|d||d|||f7}qP|j|dS)NZauthlogin_nsswitch_use_ldapZkerberos_enabledrZnsswitch_domainz .SH NSSWITCH DOMAIN zb .PP If you want to %s for the %s, you must turn on the %s boolean. .EX .B setsebool -P %s 1 .EE , )r6rrr;rRrNrr:)rZZnsswitch_typesZnsswitch_booleansZnsswitchbooltextrrrrrr^s   zManPage._nsswitch_domaincCsZt|jdkrdS|jdd|ji|jdd|j|jdd|jidS)Nra .SH PROCESS TYPES SELinux defines process types (domains) for each process running on the system .PP You can see the context of a process using the \fB\-Z\fP option to \fBps\bP .PP Policy governs the access confined processes have to files. SELinux %(domainname)s policy is very flexible allowing users to setup their %(domainname)s processes in as secure a method as possible. .PP The following process types are defined for %(domainname)s: rkz .EX .B %s .EErz .PP Note: .B semanage permissive -a %(domainname)s_t can be used to make the process type %(domainname)s_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. )r;rrRrNrkr:r`rrrrvs   zManPage._process_typesc Csg|_|jD](}||js(||jr |j|q t|jdkrHdS|jdd|ji|jD]h}|jd|d}dD]J}||f|j vr|r|jdd}|jd |d |j ||ffqqddS) Nra .SH PORT TYPES SELinux defines port types to represent TCP and UDP ports. .PP You can see the types associated with a port by using the following command: .B semanage port -l .PP Policy governs the access confined processes have to these ports. SELinux %(domainname)s policy is very flexible allowing users to setup their %(domainname)s processes in as secure a method as possible. .PP The following port types are defined for %(domainname)s:rkz .EX .TP 5 .B %s .TP 10 .EE TtcpZudpz Default Defined Ports:Fz %s %s .EE,) rryrrrkrr;rRrNrvr:)rZr<ponceZprotrrrrs,    zManPage._port_typesc Cslg}g}g}|jD]T}||jr||||jvs@||jvrJ||||jvr||j|d}qt|dkrxdS|i}|D]h}d}|D]$}||r|||d}qq|st D],} || r| drg||dd<qqqg} |D]} t|| dkr| | q|j dd|jit| dkrz|j d | D]*} |j d |j| | d d d qN|r|j d|j|d d|j dd|ji||D]}|j d|t|f||jvrd} t|j|ddkrd} |j d| |j|ddf|j|dddD]} |j d| q@q|j ddS)NregexrFTz(/.*)?ia .SH FILE CONTEXTS SELinux requires files to have an extended attribute to define the file type. .PP You can see the context of a file using the \fB\-Z\fP option to \fBls\bP .PP Policy governs the access confined processes have to these files. SELinux %(domainname)s policy is very flexible allowing users to setup their %(domainname)s processes in as secure a method as possible. .PP rkz .PP .B EQUIVALENCE DIRECTORIES a .PP %(domainname)s policy stores data with multiple different file context types under the %(equiv)s directory. If you would like to store the data in a different directory you can use the semanage command to create an equivalence mapping. If you wanted to store this data under the /srv directory you would execute the following command: .PP .B semanage fcontext -a -e %(equiv)s /srv/%(alt)s .br .B restorecon -R -v /srv/%(alt)s .PP r>r?)rkequivZalta .PP .B STANDARD FILE CONTEXT SELinux defines the file context types for the %(domainname)s, if you wanted to store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk. .B semanage fcontext -a -t %(type)s '/srv/my%(domainname)s_content(/.*)?' .br .B restorecon -R -v /srv/my%(domainname)s_content Note: SELinux often uses regular expressions to specify labels that match multiple files. )rkrz= .I The following file types are defined for %(domainname)s: z .EX .PP .B %s .EE - %s rrbsz .br .TP 5 Path%s: %sz, %sa .PP Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the .B semanage fcontext command. This will modify the SELinux labeling database. You will need to use .B restorecon to apply the labels. )r|rrkrr2r4rr;r! equiv_dirsrrRrNrr Zget_description)rZflistZflist_non_execZmpathsr<ZmdirsZmpr/Zmderrpluralxrrrrsz               zManPage._file_contextcCs`d}|jD]D}||jkrq ||jr2|d|7}||jdr |d|7}q |j|dS)Nrz, %s_selinux(8)r)r,rkrrrRrN)rZretr"rrr _see_also*s    zManPage._see_alsocCsvt|jdkrr|jdd|ji|jD]F}|j|dd|j|ddd}|jd|||fq*dS)Nra, .SH SHARING FILES If you want to share files with multiple domains (Apache, FTP, rsync, Samba), you can set a file context of public_content_t and public_content_rw_t. These context allow any of the above domains to read the content. If you want a particular domain to write to the public_content_rw_t domain, you must set the appropriate boolean. .TP Allow %(domainname)s servers to read the /var/%(domainname)s directory by adding the public_content_t file type to the directory and by restoring the file type. .PP .B semanage fcontext -a -t public_content_t "/var/%(domainname)s(/.*)?" .br .B restorecon -F -R -v /var/%(domainname)s .pp .TP Allow %(domainname)s servers to read and write /var/%(domainname)s/incoming by adding the public_content_rw_t type to the directory and by restoring the file type. You also need to turn on the %(domainname)s_anon_write boolean. .PP .B semanage fcontext -a -t public_content_rw_t "/var/%(domainname)s/incoming(/.*)?" .br .B restorecon -F -R -v /var/%(domainname)s/incoming .br .B setsebool -P %(domainname)s_anon_write 1 rkrrbzW .PP If you want to %s, you must turn on the %s boolean. .EX .B setsebool -P %s 1 .EE )r;rrRrNrkrrrrrrr5s ,zManPage._public_contentcCsp|jdt|jdkr&|jd|jdkr<|jd|jd|j|jdkrd|jd|dS)Na# .SH "COMMANDS" .B semanage fcontext can also be used to manipulate default file context mappings. .PP .B semanage permissive can also be used to manipulate whether or not a process type is permissive. .PP .B semanage module can also be used to enable/disable/install/remove policy modules. rzF .B semanage port can also be used to manipulate the port definitions rzA .B semanage boolean can also be used to manipulate the booleans z .PP .B system-config-selinux is a GUI tool available to customize SELinux policy settings. .SH AUTHOR This manual page was auto-generated using .B "sepolicy manpage". .SH "SEE ALSO" selinux(8), %s(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)z, setsebool(8))rRrNr;rrrkrr`rrrrWs       zManPage._footercCs>||jdfvrdS|dr:|D]}||j|vr dSq dS)Nr0FrrT)rrr&)rZcheckr6arrr _valid_writes zManPage._valid_writecsddtfddtD}t|dkr0dSjdt|dkrXdd |}n d |d}jd j|jfd |vr|d jd g}|D] }|j vr|j |d7}qjdd |dS)NcSsg|] }|dqS)targetr).0rrrr z(ManPage._entrypoints..cs&|djko$|ddko$d|dvS)Nsourceclassfile entrypointpermlistr)yr`rrsz&ManPage._entrypoints..rz .SH "ENTRYPOINTS" rbz\fB%s\fP file typesrz\fB%s\fP file typezw The %s_t SELinux type can be entered via the %s. The default entrypoint paths for the %s_t domain are the following: Zbin_tz] All executables with the default executable label, usually stored in /usr/bin and /usr/sbin.rz %s) filterr get_all_allow_rulesr;rRrNr:rkremover)rZZ entrypointsZentrypoints_strpathsrrr`rrs,        zManPage._entrypointscCsXztttjd}Wnty*YdS0|j|dvr>dS|jdd|jidS)Nmcs_constrained_typer&a .SH "MCS Constrained" The SELinux process type %(type)s_t is an MCS (Multi Category Security) constrained type. Sometimes this separation is referred to as sVirt. These types are usually used for securing multi-tenant environments, such as virtualization, containers or separation of users. The tools used to launch MCS types, pick out a different MCS label for each process group. For example one process might be launched with %(type)s_t:s0:c1,c2, and another process launched with %(type)s_t:s0:c3,c4. The SELinux kernel only allows these processes can only write to content with a matching MCS label, or a MCS Label of s0. A process running with the MCS level of s0:c1,c2 is not allowed to write to content with the MCS label of s0:c3,c4 r) r(r rr) StopIterationrrRrNrk)rZrrrrrs zManPage._mcs_typescsDjgz*ttfddtdd7Wn Yn0ttfddt}|dusnt|dkrrdSg}ddg}|D].}|d|r|d|vr||dqt|dkrdSj d j d j | d |vrd g}|D]D}j d ||j vrj |d D]}j d|q&qdS)Ncs|djkS)Nrrrr`rrrrz!ManPage._writes..rr6cs.|dvo,tddg|do,|ddkS)NrrMrNrrr)setissubsetr)src_listrrrs Z proc_typeZ sysctl_typerz .SH "MANAGED FILES" z The SELinux process type %s_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. Z file_typez .br .B %s rz %s .br )rlistrr Zget_all_types_inforr;rrrRrNrkr!r)rZrZ all_writesr6rEr<rr)rZrrrsD*    zManPage._writescCs|j|jvr|j|jSdS)NZs0)rkr{r`rrr_get_users_ranges  zManPage._get_users_rangecCsd|jdd|ji|jd|j|j|dd|jvr`d|jvr`|jdd|jidS)Nzd.TH "%(type)s_selinux" "8" "%(type)s" "mgrepl@redhat.com" "%(type)s SELinux Policy documentation"ra .SH "NAME" %(user)s_u \- \fB%(desc)s\fP - Security Enhanced Linux Policy .SH DESCRIPTION \fB%(user)s_u\fP is an SELinux User defined in the SELinux policy. SELinux users have default roles, \fB%(user)s_r\fP. The default role has a default type, \fB%(user)s_t\fP, associated with it. The SELinux user will usually login to a system with a context that looks like: .B %(user)s_u:%(user)s_r:%(user)s_t:%(range)s Linux users are automatically assigned an SELinux users at login. Login programs use the SELinux User to assign initial context to the user's shell. SELinux policy uses the context to control the user's access. By default all users are assigned to the SELinux user via the \fB__default__\fP flag On Targeted policy systems the \fB__default__\fP user is assigned to the \fBunconfined_u\fP SELinux user. You can list all Linux User to SELinux user mapping using: .B semanage login -l If you wanted to change the default user mapping to use the %(user)s_u user, you would execute: .B semanage login -m -s %(user)s_u __default__ )rr rlogin_userdomainz If you want to map the one Linux user (joe) to the SELinux user %(user)s, you would execute: .B $ semanage login -a -s %(user)s_u joe r )rRrNrkrrr6rxr`rrrrs!zManPage._user_headerc Csd|j}|jd||jvr|jd}|jdd|ji|j|D]N}|jd|dd|jd|jd |jd |g|j|d qJ|jd |jdS) Nz %s_sudo_tz .SH SUDO rtz The SELinux user %(user)s can execute sudo. You can set up sudo to allow %(user)s to transition to an administrative domain: Add one or more of the following record to sudoers using visudo. r z USERNAME ALL=(ALL) ROLE=%(admin)s_r TYPE=%(admin)s_t COMMAND .br sudo will run COMMAND as %(user)s_u:%(admin)s_r:%(admin)s_t:LEVEL r+)Zadminr a_ You might also need to add one or more of these new roles to your SELinux user record. List the SELinux roles your SELinux user can reach by executing: .B $ semanage user -l |grep selinux_name Modify the roles list and add %(user)s_r to this list. .B $ semanage user -m -R '%(roles)s' %(user)s_u For more details you can see semanage man page. r9)r Zrolesz7 The SELinux type %s_t is not allowed to execute sudo. )rkrRrNr&r}r:)rZZsudotyper1Z adminrolerrrrs"     zManPage._can_sudocCsd|jdd|jvr(|jd|jd|jvrD|jd|jd|jvr`|jd|jdS)Nz .SH USER DESCRIPTION Zunconfined_usertypez The SELinux user %s_u is an unconfined user. It means that a mapped Linux user to this SELinux user is supposed to be allow all actions. Zunpriv_userdomainz The SELinux user %s_u is defined in policy as a unprivileged user. SELinux prevents unprivileged users from doing administration tasks without transitioning to a different role. Z admindomainz The SELinux user %s_u is an admin user. It means that a mapped Linux user to this SELinux user is intended for administrative actions. Usually this is assigned to a root Linux user. )rRrNr6rkr`rrrrFs    zManPage._user_attributecCsJd|jvrF|jdd|jvr4|jd|jn|jd|jdS)NZx_domainz .SH X WINDOWS LOGIN z3 The SELinux user %s_u is able to X Windows login. z7 The SELinux user %s_u is not able to X Windows login. rxrRrNr6rkr`rrrrYs   zManPage._xwindows_logincCsJd|jvrF|jdd|jvr4|jd|jn|jd|jdS)Nrz .SH TERMINAL LOGIN z2 The SELinux user %s_u is able to terminal login. z6 The SELinux user %s_u is not able to terminal login. rr`rrr_terminal_logings   zManPage._terminal_loginc Csddlm}|jddD]}||j|d}t|dkr|jd|j|f|D],}||D]\}}|jdd|qbqV||jd d }t|dkr|jd |j|D],}||D]\}}|jdd|qqqdS) Nr)networkz .SH NETWORK rZ name_bindzH .TP The SELinux user %s_u is able to listen on the following %s ports. z .B %s rrZ name_connectzJ .TP The SELinux user %s_u is able to connect to the following tcp ports. ) r rrRrNZget_network_connectrr;rkr:)rZrnetZportdictrrrrrrrus.     zManPage._networkcsXttfddt}jd|durBjdjnjdjdS)Ncs@|djko>|ddko>|ddko>tgdt|dS)NrrZuser_home_typerr)ZioctlreadgetattrZexecuteZexecute_no_transrMr)rrrrr`rrrs   z$ManPage._home_exec..z .SH HOME_EXEC z; The SELinux user %s_u is able execute home content files. z? The SELinux user %s_u is not able execute home content files. )rrr rrRrNrk)rZrrr`rrs zManPage._home_execcCs|jdd|jidS)Na .SH TRANSITIONS Three things can happen when %(type)s attempts to execute a program. \fB1.\fP SELinux Policy can deny %(type)s from executing the program. .TP \fB2.\fP SELinux Policy can allow %(type)s to execute the program in the current user type. Execute the following to see the types that the SELinux user %(type)s can execute without transitioning: .B sesearch -A -s %(type)s -c file -p execute_no_trans .TP \fB3.\fP SELinux can allow %(type)s to execute the program and transition to a new type. Execute the following to see the types that the SELinux user %(type)s can execute and transition: .B $ sesearch -A -s %(type)s -c process -p transition r)rRrNrr`rrrrszManPage._transitionscCs|jdd|ji|jd|j|jdg}|jD]"}|jd|j|vr:||q:t|dkrd}t|dkrd }|jd d |||jfdS) Nzd.TH "%(user)s_selinux" "8" "%(user)s" "mgrepl@redhat.com" "%(user)s SELinux Policy documentation"r a[ .SH "NAME" %(user)s_r \- \fB%(desc)s\fP - Security Enhanced Linux Policy .SH DESCRIPTION SELinux supports Roles Based Access Control (RBAC), some Linux roles are login roles, while other roles need to be transition into. .I Note: Examples in this man page will use the .B staff_u SELinux user. Non login roles are usually used for administrative tasks. For example, tasks that require root privileges. Roles control which types a user can run processes with. Roles often have default types assigned to them. The default type for the %(user)s_r role is %(user)s_t. The .B newrole program to transition directly to this role. .B newrole -r %(user)s_r -t %(user)s_t .B sudo is the preferred method to do transition from one role to another. You setup sudo to transition to %(user)s_r by adding a similar line to the /etc/sudoers file. USERNAME ALL=(ALL) ROLE=%(user)s_r TYPE=%(user)s_t COMMAND .br sudo will run COMMAND as staff_u:%(user)s_r:%(user)s_t:LEVEL When using a non login role, you need to setup SELinux so that your SELinux user can reach %(user)s_r role. Execute the following to see all of the assigned SELinux roles: .B semanage user -l You need to add %(user)s_r to the staff_u user. You could setup the staff_u user to be able to use the %(user)s_r role with a command like: .B $ semanage user -m -R 'staff_r system_r %(user)s_r' staff_u )rr rtrrrbrz SELinux policy also controls which roles can transition to a different role. You can list these rules using the following command. .B search --role_allow SELinux policy allows the %s role%s can transition to the %s_r role. r)rRrNrkrr}rr;r:)rZZtrolesrErrrrrs") *     zManPage._role_header)rpr>FF)*rlrmrnror rrUrTr[rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrisN 9   +p "* #0-)r)r)#__all__rBr~r rctimerrrstrftimegmtimeintenvironr rr rrrr$r'r*r,rr2r3r4r5r&r8r=rGrSrrrrrrsH     )