+
    	:i  c                   s   . R#Ot ^ RIt^ RIt^ RIt^ RIt^ RItRR$RR%RRRR/tR	R
.RR.RRR.RR.RR.RR./tR.t]P                  ! R]P                  ! ]! ]P                  P                  R]P
                  ! 4       4      4      4      4      tRsR&R ltRsRsR tRsR tRsR tRsR tR tR tR  t ! R! R4      t ! R" R 4      tR# )'ManPageHTMLManPagesNZantivirus_tZ	cluster_tZsvirt_tZqemu_tZhttpd_tZphpfpm_tZsmbdZsambaZhttpdZapacheZvirtdZvirtZlibvirtZnamedZbindZfsdaemonZsmartmonZmdadmZraidz/varz%y-%m-%dZSOURCE_DATE_EPOCHc                 s   \         '       d   \         # ^ RIp/ s  VP                  P                  P	                  \
        P                  ! V 4      4      pVP                  R4       Fy  pVP                  R4       Fa  pVP                  R4      pVR8X  g   VR8X  d   K$  VR8X  d   RpVR8X  d   RpVP                  R	4       F  pVP                  \         V&   K  	  Kc  	  K{  	  \         #   \         d	     \         # i ; i)
    NZlayerZmodulenameuserZ
unconfinedZ
unprivuserZunconfineduserZsummary)modules_dictZxml.etree.ElementTreeZetreeZElementTreeZ
fromstringsepolicyZ
policy_xmlZfindallgetZtextZIOError)pathZxmlZtreeZlmr   b   &      5/usr/lib/python3.14/site-packages/sepolicy/manpage.pygen_modules_dictr   /   s    | Lyy$$//0C0CD0IJg&AYYx(uuV}6>T\%9<'!D++'D9-A)*L& . ) '   s   CC' 'C:9C:c                  s   \         '       d   \        '       d   \         \        3# . s / s. p \        P                  ! \        P                  4      pV FQ  pV P                  VR ,          4       RV9   g   K$  VR,          \        VR ,          P                  R4      ^ ,          &   KS  	  V  F1  pVR9  g   K  \         P                  VP                  RR4      4       K3  	  \         P                  4        \         \        3# )r   range_Z_u )Zsystem_urootZunconfined_u)	usersusers_ranger   infoZUSERappendsplitZreplacesort)ZallusersZallusers_infodZu       r   get_all_users_infor   K   s     uk!!EKHMM(--0M&	"a<34W:K&	,Q/0 
 88LL4,-  
JJL+    c                  s    \         '       g6   \        \        P                  ! \        P                  R 4      4      R,          s \         # )Z
entry_typetypes)all_entrypointsnextr   r   	ATTRIBUTE r   r   get_entrypointsr!   c   s.    ?x}}X-?-?NOPWXr   c                  s~   \         '       d   \         # . s \        P                  ! 4        F,  p R pV RR pV\         9   d   K  \         P                  V4       K.  	  \        P                  ! 4        F2  pVRR \         9   g   VR8X  d   K  \         P                  VRR 4       K4  	  \         P                  4        \         # )FNZsystem_r)domainsr   get_all_domainsr   get_all_rolesr   )r   founddomainroler   r   gen_domainsr)   l   s    wG%%'3B Wv ( &&(94:#5tCRy! )
 LLNNr   c                  s    \         '       d   \         # \        P                  ! \        P                  4      p / s V  F  p VR ,          \         VR,          &   K  	  \         #    . \         TR,          &    K:  ; i)
attributesr   )r   r   r   TYPE)Z	all_typesZrecs     r   
_gen_typesr,      sa    uhmm,IE	$!$\!2E#f+ 
 L	$!#E#f+s   A  A5c                 s\    R P                  V R\        V4      )  P                  R4      4      # ) Nr   )joinlenr   )fZtrim   &&r   prettyprintr2      s(    88AkD	zN((-..r   c                 sF   \         P                  \        P                  . 4      p\        P                   Fh  p. pV  FP  pVP	                  R 4      R,          ^ ,          V8X  g   K)  VP                  VP	                  R 4      R,          4       KR  	  \        V4      W&   Kj  	  V# )/)ZdictZfromkeysstringZascii_lettersr   r   Zsorted)Zmanpage_listZalphabet_manpagesiZtempZj   &    r   get_alphabet_manpagesr8      s    f&:&:B?!!Awws|B"a'AGGCL,-   &d| " r   c                 s     ^ RI Hp V! RV,          4      w  r4V^ 8X  d<   \	        V R4       \        V R4      pVP                  V4       VP                  4        R# R#   \         d
    ^ RIHp  Lhi ; i)r   )getstatusoutputz)/usr/bin/groff -man -Thtml %s 2>/dev/nullzhas been createdwN)Zcommandsr9   ZImportErrorZ
subprocessprintopenwriteclose)Zhtml_manpageZmanpager9   ZrcZoutputfds   &&    r   convert_manpage_to_htmlr@      sj    /, !!Lw!VWJB	Qwl./,$


	   /./s   A A10A1c                   sB   a  ] tR t^t o RtR tR tR tR tR t	Rt
V tR# )	r   z6
Generate a HTML Manpages on an given SELinux domains
c                s    \        V4      V n        \        V4      V n        W@n        VR ,           V n        V P                  V n        V P                  4        R# )r3   N)r8   manpage_rolesmanpage_domains
os_versionold_pathnew_path _HTMLManPages__gen_html_manpages)selfrA   rB   r   rC   s   &&&&&r   __init__ZHTMLManPages.__init__   sC    2=A4_E$s
  "r   c                sf    V P                  4        V P                  4        V P                  4        R # N)_write_html_manpage
_gen_index_gen_cssrG      &r   Z__gen_html_manpagesZ HTMLManPages.__gen_html_manpages   s!      "r   c           	     s   \         P                  P                  V P                  4      '       g!   \         P                  ! V P                  4       V P
                  P                  4        Fk  p\        V4      '       g   K  V FO  p\        V P                  VP                  R ^4      ^ ,          ,           R,           V P                  V,           4       KQ  	  Km  	  V P                  P                  4        Fk  p\        V4      '       g   K  V FO  p\        V P                  VP                  R ^4      ^ ,          ,           R,           V P                  V,           4       KQ  	  Km  	  R# )_selinuxz.htmlN)osr   ZisdirrE   ZmkdirrB   Zvaluesr/   r@   rsplitrD   rA   )rG   r'   r   r(   rr7   r   rJ   Z HTMLManPages._write_html_manpage   s    ww}}T]]++HHT]]#**113F6{{A+T]]QXXjRS=TUV=W-WZa-adhdqdqtuduv   4
 &&--/D4yyA+T]]QXXjRS=TUV=W-WZa-adhdqdqtuduv  0r   c                s   V P                   R ,           p\        VR4      pVP                  RV P                  ,          4       V P                   FA  p\        V P                  V,          4      '       g   K'  VP                  RV: RV: R24       KC  	  VP                  R4       RpV P                   F}  p\        V P                  V,          4      '       g   K'  VR,          pV P                  V,           F6  pVP                  R	^4      ^ ,          pVR
V: RV: RV: RV: R2	,          pK8  	  K  	  VP                  RV,          4       V P                   FA  p\        V P                  V,          4      '       g   K'  VP                  RV: RV: R24       KC  	  VP                  R4       RpV P                   F}  p\        V P                  V,          4      '       g   K'  VR,          pV P                  V,           F6  pVP                  R	^4      ^ ,          pVR
V: RV: RV: RV: R2	,          pK8  	  K  	  VP                  RV,          4       VP                  4        \        RV,          4       R# )z
index.htmlr:   z
<html>
<head>
	<link rel=stylesheet type="text/css" href="style.css" title="style">
	<title>SELinux man pages</title>
</head>
<body>
<h1>SELinux man pages for %s</h1>
<hr>
<table><tr>
<td valign="middle">
<h3>SELinux roles</h3>
z

<a href=#z_role>z</a>z
</td>
</tr></table>
<pre>
r   z<p>rO   z<a name=z_role></a><a href=z.html>z9_selinux(8)</a> - Security Enhanced Linux Policy for the z SELinux user
zH%s
</pre>
<hr>
<table><tr>
<td valign="middle">
<h3>SELinux domains</h3>z_domain>z</a>
			z_domain></a><a href=z SELinux processes
z%s
</pre>
</body>
</html>
%s has been createdN)
rE   r<   r=   rC   rA   r/   rQ   rB   r>   r;   )	rG   htmlr?   ZletterZrolename_bodyrR   ZrolenameZdomainname_body
domainnames	   &        r   rK   ZHTMLManPages._gen_index   sQ   }}|+$_
  oo 	 ((F4%%f-.."F, - ) 	  	
 ((F4%%f-..&++F33A xx
A6q9H!  \b  dl  nv  x@  &A  AM 4 ) 	  !! 	" **F4''/00
&  + 	  	
 **F4''/005(--f55A!"*a!8!;J#  ek  mw  yC  EO  (P  PO 6 + 	  	 	 	
#d*+r   c                s    V P                   R ,           p\        VR4      pVP                  R4       VP                  4        \	        RV,          4       R# )z	style.cssr:   aQ  
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;
}
rS   N)rD   r<   r=   r>   r;   )rG   Z	style_cssr?      &  r   rL   ZHTMLManPages._gen_css  sG    MMK/	)S!
 7 7	r 	
#i/0r   )rB   rA   rE   rD   rC   N)__name__
__module____qualname____firstlineno____doc__rH   rF   rJ   rK   rL   __static_attributes____classdictcell__Z__classdict__   @r   r   r      s+     #
wE,N=1 =1r   c                   s  a  ] tR tRt o RtRtRR.t. t. tR)R lt	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R(t+V t,R# )*r    iY  z?
Generate a Manpage on an SELinux domain in the specified path
NZDisabledZEnabledc                s   WPn         W@n        W0n        \        P                  ! 4       ^ ,          V n        \        4       V n        \        P                  ! 4       V n	        \        P                  ! 4       V n        \        P                  ! 4       V n        \        P                  ! 4       V n        \        P                   ! 4       V n        \%        4       ^ ,          V n        \%        4       ^,          V n        \        P*                  ! 4       V n        \        P.                  ! 4       V n        \3        4       V n        V P                  '       d   V P                  R,           V n        M+V P                  \8        P:                  ! 4       ,           V n        \        P<                  ! V P6                  4      V n        \@        PB                  ! VRR7       W n"        V P                  '       d   V P                  R,           V n#        MV P                  R,           V n#        \        PH                  ! V PF                  4      V n%        \        PL                  ! V4      w  V n'        V n(        V PN                  R,           V n)        V PU                  4        V: RV PN                  : R2V n+        \Y        V PV                  R	4      V n-        V PN                  R
,           V P"                  9   dI   V P]                  4        V P                   '       d&   V P^                  Pa                  V PV                  4       MGV P                   '       d&   V Pb                  Pa                  V PV                  4       V Pe                  4        V PZ                  Pg                  4        \h        Pk                  4        F:  pW`PN                  8X  g   K  \h        V,           F  pV Pm                  V4       K  	  K<  	  R# )r   Zfile_contextsT)Zexist_okz
policy.xml#/usr/share/selinux/devel/policy.xml_tr3   
_selinux.8r:   _rN)7rT   source_filesr   r   Zgen_port_dictportrecsr)   r#   r$   all_domainsZget_all_attributesall_attributesZget_all_bools	all_boolsZget_all_port_typesall_port_typesr%   	all_rolesr   	all_usersall_users_rangeZget_all_file_typesall_file_typesZget_all_role_allowsrole_allowsr,   r   fcpathselinuxZselinux_file_context_pathZ
get_fcdictfcdictrP   Zmakedirsr   xmlpathZgen_bool_dictbooleans_dictZgen_short_namerU   
short_nametype
_gen_boolsman_page_pathr<   r?   _ManPage__gen_user_man_pagerA   r   rB   _ManPage__gen_man_pager>   
equiv_dictkeys_ManPage__gen_man_page_link)rG   rU   r   r   rd   rT   kaliass   &&&&&&  r   rH   ZManPage.__init__c  s   	(	 ..03"}#335&99;!//1&99;!//1+-a013A6&99;#779\
))o5DK))g&G&G&IIDK))$++6
D4(	99|3DL99'LLDL%33DLLA+3+B+B:+N(OOd*	26Ht))3/??T!T^^3$$&yyy""))$*<*<=yyy$$++D,>,>?!"AOO#']]E,,U3 + #r   c                s   . V n         . V n        V P                  .pV P                  \        9   dQ   \        V P                  ,           F5  pVR ,           V P
                  9   g   K  VP                  VR ,           4       K7  	  V FM  p\        P                  ! V4      w  r4V ;P                   V,          un         V ;P                  V,          un        KO  	  V P                   P                  4        V P                  P                  4        R# )ra   N)
boolsdomainboolsru   rU   rz   rf   r   r   Z	get_boolsr   )rG   r   tr   r   r7   r   rv   ZManPage._gen_bools  s    
??j(00t8t///LLT* 1 A!)!3!3A!6KJJ%J+ 
 	

r   c                s    V P                   # rI   )rw   rM   rN   r   get_man_page_pathZManPage.get_man_page_path  s    !!!r   c                s   V P                   R ,           V n        V P                  '       g   \        V P                  4      V n         V P                  V P                   ,          V n        T P                   T P                  9   d   \        \        P                  ! \        P                  T P                  4      4      R,          T n        T P                  4        T P                  4        T P                  4        T P!                  4        T P#                  4        T P%                  4        T P'                  4        T P)                  4        M T P+                  4        T P%                  4        T P-                  4        T P/                  4        T P1                  4        T P3                  4        R#    RT P                   ,          T n         EL_; i)rc   z%s user roler*   N)rU   r(   r   r   rr   descrk   r   r   r   r+   ru   r*   _user_header_user_attribute	_can_sudo_xwindows_login_network	_booleans
_home_exec_transitions_role_header_port_types
_mcs_types_writes_footerrM   rN   r   Z__gen_user_man_pageZManPage.__gen_user_man_page  s.   OOd*	    0 >D	9))$//:DI ??dnn,"8==#LMl[DO  "NN  " MMONNOONN-	9&8DIs   "F* *Gc                s   V P                   : R V: R2p\        V P                   : R V: R2R4      V n        V P                  P                  RV P                  ,          4       V P                  P                  4        \        V4       R# )r3   rb   r:   z.so man8/%s_selinux.8N)r   r<   r?   r=   rU   r>   r;   )rG   r~   r      && r   Z__gen_man_page_linkZManPage.__gen_man_page_link  sU    $(IIu5DIIu=sC-?@dr   c                sH   . V n         / V n        . V n        V P                  4        V P                   F  p \        V,          '       dJ   V P
                  pV P                  p\        V,           F  pV P                  V4       K  	  W n        W0n        \        \        P                  ! \        P                  R T,          4      4      R,          T P                  T&   K  	  V P                  4        V P                  4        V P                  4        V P!                  4        V P#                  4        V P%                  4        V P'                  4        V P)                  4        V P+                  4        V P-                  4        V P/                  4        R#   \         d     EKn  i ; i)z%sr*   N)	anon_listr*   ptypes_get_ptypestypealias_typesr?   rw   _typealias_gen_manZKeyErrorr   r   r   r+   _header_entrypoints_process_typesr   r   _nsswitch_domainr   r   _file_context_public_contentr   )rG   Zdomain_typer?   rw   r   r7   r   Z__gen_man_pageZManPage.__gen_man_page  s=   ;;K	";//B%)%7%7M,[99//2 : G)6& ,0hmmdVaMa0b+cdp+qDOOK( ' 	  s   AFF! F!c                s    V P                    Fb  pVP                  V P                  4      '       g$   VP                  V P                  4      '       g   KG  V P                  P                  V4       Kd  	  R # rI   )rf   
startswithrt   rU   r   r   )rG   r0      & r   r   ZManPage._get_ptypes  sI    !!A||DOO,,T__0M0M""1% "r   c                s   V P                   : R VRR : R2V n        . V n        RV n        \	        V P                  R4      V n        V P                  VRR 4       V P                  4        V P
                  P                  4        R# )r3   Nrb   r   r:   r"   )	r   rw   portsbooltextr<   r?   
_typealiasr   r>   )rG   r   r1   r   r   ZManPage._typealias_gen_man  sc    26))QsVD
t))3/#2r   c                s   V P                   P                  R RVR\        /,          4       V P                   P                  RRVRV P                  /,          4       V P                   P                  RRV P                  /,          4       R# )z\.TH  "%(typealias)s_selinux"  "8"  "%(date)s" "%(typealias)s" "SELinux Policy %(typealias)s"	typealiasdatez
.SH "NAME"
%(typealias)s_selinux \- Security Enhanced Linux Policy for the %(typealias)s processes
.SH "DESCRIPTION"

%(typealias)s_t SELinux domain type is now associated with %(domainname)s domain type (%(domainname)s_t).
rU   zC
Please see

.B %(domainname)s_selinux

man page for more details.
N)r?   r=   man_daterU   )rG   r   r1   r   r   ZManPage._typealias  s|    t	68<= 	>  9l4??;< 	= 	  	T__%& 	'r   c                s    V P                   P                  R RV P                  R\        /,          4       V P                   P                  RRV P                  /,          4       R# )z_.TH  "%(domainname)s_selinux"  "8"  "%(date)s" "%(domainname)s" "SELinux Policy %(domainname)s"rU   r   a  
.SH "NAME"
%(domainname)s_selinux \- Security Enhanced Linux Policy for the %(domainname)s processes
.SH "DESCRIPTION"

Security-Enhanced Linux secures the %(domainname)s processes via flexible mandatory access control.

The %(domainname)s processes execute with the %(domainname)s_t SELinux type. You can check if you have these processes running by executing the \fBps\fP command with the \fB\-Z\fP qualifier.

For example:

.B ps -eZ | grep %(domainname)s_t

N)r?   r=   rU   r   rM   rN   r   r   ZManPage._header  sT    w%tIJ 	K  T__%& 	'r   c                s    V P                   V,          ^,          ^ ,          P                  4       V P                   V,          ^,          R,          ,           pVR,          R8X  d   VRR pV# )i   i   NNZ.Nr4   )rs   lowerrG   r
   r   r   r   _format_boolean_descZManPage._format_boolean_desc'  sZ    !!!$Q'*002T5G5G5J15Mb5QQ8s?9Dr   c                sv   R pV P                   V P                  ,            F  w  r#VP                  R4      '       d.   W P                  9  d   V P                  P	                  V4       KI  W P
                  9  d   K[  VRV P                  V4      : RV: RV P                  V,          : RV: R2	,          pK  	  V# )r   Z
anon_write
.PP
If you want to , you must turn on the z
 boolean. z" by default.

.EX
.B setsebool -P z 1

.EE
)r   r   endswithr   r   rs   r   enabled_str)rG   r   r
   Zenabled   &   r   _gen_bool_textZManPage._gen_bool_text-  s    **TZZ77JAzz,''A^^,C%%a(...   #Q(8(8(A(A1F F 8 r   c                s   V P                  4       V n        V P                  R 8w  d`   V P                  P                  RV P                  : RV P                  : R24       V P                  P                  V P                  4       R# R# )r   zN
.SH BOOLEANS
SELinux policy is customizable based on least access required.  zg policy is extremely flexible and has several booleans that allow you to manipulate the policy and run z% with the tightest access possible.

N)r   r   r?   r=   rU   rM   rN   r   r   ZManPage._booleans@  s]    ++-==BGGMM 	) * GGMM$--( r   c                s   . pR R.pRpV P                   P                  4        F.  pRV P                   V,          9   g   K  VP                  V4       K0  	  \        V4      '       d]   V P                  P                  R4       V F;  pVRV P                  V4      : RRP                  V4      : RV: R	V: R
2	,          pK=  	  V P                  P                  V4       R# )Zauthlogin_nsswitch_use_ldapZkerberos_enabledr   Znsswitch_domainz
.SH NSSWITCH DOMAIN
r   z	 for the , r    boolean.

.EX
.B setsebool -P  1
.EE
N)r*   r{   r   r/   r?   r=   r   r.   )rG   Znsswitch_typesZnsswitch_booleansZnsswitchbooltextr}   r
   s   &     r   r   ZManPage._nsswitch_domainL  s    :<NO%%'A DOOA$66%%a( ( ~GGMM   '    #dii&?!Q%H H  ' 	&'r   c                sl   \        V P                  4      ^ 8X  d   R# V P                  P                  RRV P                  /,          4       V P                  P                  RRP                  V P                  4      ,          4       V P                  P                  RRV P                  /,          4       R# )r   Na  
.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:
rU   z
.EX
.B %s
.EEr   z
.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/   r   r?   r=   rU   r.   rM   rN   r   r   ZManPage._process_typesd  s    t{{q  
 T__%
& 
	' 	  
4;;	  	! 	 
 T__%& 	'r   c                s   . V n         V P                   Fb  pVP                  V P                  4      '       g$   VP                  V P                  4      '       g   KG  V P                   P                  V4       Kd  	  \        V P                   4      ^ 8X  d   R# V P                  P                  RRV P                  /,          4       V P                    F  pV P                  P                  RV,          4       RpR F  pW$3V P                  9   g   K  V'       d   V P                  P                  R4       RpV P                  P                  RV: R	R
P                  V P                  W$3,          4      : R24       K  	  K  	  R# )r   Na  
.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:rU   z

.EX
.TP 5
.B %s
.TP 10
.EE
Tz

Default Defined Ports:F
r-   ,z
.EEtcpZudp)r   ri   r   rt   rU   r   r/   r?   r=   re   r.   )rG   r0   pZonceZprotr7   r   r   ZManPage._port_types}  s,   
$$A||DOO,,T__0M0M

!!!$ % tzz?a < @LT__>]^ 	_ AGGMM   	 D&9- '  !DGGMM
y12#4 5 ' r   c                sp   . p. pV P                    Fi  pVP                  V P                  4      '       g   K&  VP                  V4       W0P                  9   g   KI  W P                  V,          R ,          ,           pKk  	  \        V4      ^ 8X  d   R# VP                  4        / pV F  pRpV F5  pVP                  V4      '       g   K  WG,          P                  V4       Rp M	  V'       d   KJ  \         F=  pVP                  V4      '       g   K  VP                  R4      '       g   K5  . WERR &    K  	  K  	  . p	V F,  p
\        WJ,          4      ^ 8  g   K  V	P                  V
4       K.  	  V P                  P                  RRV P                  /,          4       \        V	4      ^ 8  dm   V P                  P                  R4       V	 FK  pV P                  P                  RRV P                  R	VR
VP                  R4      R,          /,          4       KM  	  V P                  P                  RRV P                  RV^ ,          /,          4       V P                  P                  RRV P                  /,          4       VP                  4        V EF  pV P                  P                  RV: R\        P                  ! V4      : R24       W0P                  9   g   KN  Rp\        V P                  V,          R ,          4      ^8  g   Kz  RpV P                  P                  RV: RV P                  V,          R ,          ^ ,          : 24       V P                  V,          R ,          R,           F%  pV P                  P                  RV,          4       K'  	  EK  	  V P                  P                  R4       R# )regexNFTz(/.*)?a  
.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
rU   z 
.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
equivZaltr3   a  
.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/%(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.
ru   z=
.I The following file types are defined for %(domainname)s:
z

.EX
.PP
.B z
.EE

- r   r   sz
.br
.TP 5
Pathz:
r   z, %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.
ir4   )rm   r   rU   r   rq   r/   r   
equiv_dirsr   r?   r=   r   r   Zget_description)rG   ZflistZmpathsr0   ZmdirsZmpr&   ZmdZer   r	   pluralxs   &            r   r   ZManPage._file_context  s   $$A||DOO,,Q##kk!nW&==F	 %
 v;!BE==$$I$$R( E	 
 5#A}}Q''BKK,A,A)+"g $  A58}q Q  	 	 T__%	& 		' u:>GGMM     T__gq%b9IJK L  	  T__feAh78 	9 	 T__%& 	' 	

AGGMM 	(
"
"1
%' ( KKt{{1~g./!3 FGGMM 
Q(+	#- .
 "[[^G4R88fqj1 9) . 	  	r   c                s`   R pV P                    F  pW P                  8X  d   K  VP                  V P                  4      '       d   VRV,          ,          pVP                  V P                  R,           4      '       g   Kp  VRV,          ,          pK  	  V P                  P                  V4       R# )r   z, %s_selinux(8)r   N)r#   rU   r   rt   r?   r=   )rG   Zretr   rV   r   	_see_alsoZManPage._see_also  s    AOO#||DOO,,(1,,||DOOc122(1,,  	cr   c           
     s   \        V P                  4      ^ 8  d   V P                  P                  RRV P                  /,          4       V P                   F  pV P
                  V,          ^,          ^ ,          P                  4       V P
                  V,          ^,          R,          ,           pV P                  P                  RV: RV: RV: R24       K  	  R# R# )	r   a,  
.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
rU   r   r   r   r   r   N)r/   r   r?   r=   rU   rs   r   r   rV   r   r   ZManPage._public_content  s    t~~"GGMM ( T__%)& '* ^^))!,Q/288:T=O=OPQ=RST=UVX=YY Q  $- #r   c                s   V P                   P                  R 4       \        V P                  4      ^ 8  d   V P                   P                  R4       V P                  R8w  d   V P                   P                  R4       V P                   P                  RV P
                  ,          4       V P                  R8w  d   V P                   P                  R4       V P                  4        R# )a#  
.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.
zF
.B semanage port
can also be used to manipulate the port definitions
r   zA
.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)N)r?   r=   r/   r   r   rU   r   rM   rN   r   r   ZManPage._footerA  s     
 
	 tzz?QGGMM  
 ==BGGMM  
 	 
H LP??
\ 
	] ==BGGMM*+r   c                s    WP                   R 39   d   R# VP                  R4      '       d$   V F  pW0P                  V,          9   g   K   R# 	  R# )r'   Fra   T)ru   r   r   )rG   Zcheckr*   Zas   &&& r   _valid_writeZManPage._valid_writek  sD    YY))>>$

5))    r   c           	     s  a  \        V 3R  l\        P                  ! 4       4       Uu. uF  qR,          NK  	  pp\        V4      ^ 8X  d   R# S P                  P                  R4       \        V4      ^8  d   RRP                  V4      ,          pMRV^ ,          ,          pS P                  P                  RS P                  : RV: R	S P                  : R
24       RV9   d-   VP                  R4       S P                  P                  R4       . pV F7  pVS P                  9   g   K  VS P                  V,          R,          ,          pK9  	  S P                  P                  RRP                  V4      ,          4       R# u upi )c                 s   < V R ,          SP                   8H  ;'       d!    V R,          R8H  ;'       d    RV R,          9   # )sourceclassfile
entrypointpermlistru   )ZyrG      &r   <lambda>Z&ManPage._entrypoints.<locals>.<lambda>u  s;    hK499$__7v)=__,RST^R_B__r   targetNz
.SH "ENTRYPOINTS"
z\fB%s\fP file typesr   z\fB%s\fP file typez
The z'_t SELinux type can be entered via the z(.

The default entrypoint paths for the z_t domain are the following:
Zbin_tz]
All executables with the default executable label, usually stored in /usr/bin and /usr/sbin.r   z
%s)
filterr   get_all_allow_rulesr/   r?   r=   r.   rU   Zremoverq   )rG   r   ZentrypointsZentrypoints_strZpathsr   s   f     r   r   ZManPage._entrypointst  sJ   ,2 4`((*-
  -
q{{ -
 
 {q   	 {a5		+8NNO4{1~EO 	: 	;
 k!w'GGMM ` a %JT[[(Z099 & 	 		% 	?s   Fc                s    \        \        P                  ! \        P                  R 4      4      pT P
                  TR,          9  d   R# T P                  P                  RRT P                  /,          4       R#   \         d     R# i ; i)mcs_constrained_typeNr   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
ru   )	r   r   r   r   ZStopIterationru   r?   r=   rU   )rG   r   r   r   r   ZManPage._mcs_types  sw    	#'h6H6HJ`(a#b  99099 
 t  	!	  		s   .A: :B	B	c                s  a a S P                   .o S\        \        V 3R  l\        P                  ! 4       4      4      ^ ,          R,          ,          o\        \        T3R l\        P
                  ! 4       4      4      pTe   \        T4      ^ 8X  d   R# . pRR.pT FL  pS P                  TR,          T4      '       g   K$  TR,          T9  g   K4  TP                  TR,          4       KN  	  \        T4      ^ 8X  d   R# S P                  P                  R4       S P                  P                  RS P                  ,          4       TP                  4        R	T9   d   R	.pT F{  pS P                  P                  R
T,          4       TS P                  9   g   K8  S P                  T,          R,           F%  pS P                  P                  RT,          4       K'  	  K}  	  R#     EL; i)c                 s0   < V R ,          SP                   8H  # )r   r   r   rG   r   r   r   !ManPage._writes.<locals>.<lambda>  s    ai499.Dr   r*   c                 s   < V R ,          S9   ;'       d8    \        RR.4      P                  V R,          4      ;'       d    V R,          R8H  # )r   r<   r=   r   r   r   )setissubset)r   src_listr   r   r   r     sP    hK8# ! !!"++AjM:! !gJ& !r   NZ	proc_typeZsysctl_typer   z
.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

r   z	%s
.br
)ru   listr   r   Zget_all_types_infor   r/   r   r   r?   r=   rU   r   rq   )rG   r   Z
all_writesr*   r6   r0   r   r   s   f      @r   r   ZManPage._writes  s   II;	V$DhFaFaFcdefghiuvvH   ! ((*	, -
 s8}1
!=1
A  8j99X;j0%%ak2 
 z?a  	 	 
oo 	 	*$%JAGGMM  	 	
 DKK KKN733DGGMM #
#  4 ?	s   AG" "G'c                sv    V P                   V P                  9   d   V P                  V P                   ,          # R # )Zs0)rU   rl   rM   rN   r   _get_users_rangeZManPage._get_users_range  s,    ??d222''88r   c           
     s   V P                   P                  R RV P                  /,          4       V P                   P                  RRV P                  RV P                  RV P	                  4       /,          4       RV P
                  9   dD   RV P                  9   d1   V P                   P                  RRV P                  /,          4       R# R# R# )	zd.TH  "%(type)s_selinux"  "8"  "%(type)s" "mgrepl@redhat.com" "%(type)s SELinux Policy documentation"ru   a  
.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__

r   r   r   login_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

N)r?   r=   rU   r   r   r*   rg   rM   rN   r   r   ZManPage._user_header  s    |12 	3 	 > tyy&$//7D<Q<Q<ST?U 	VB 05G4K^K^5^GGMM 
 t  ! 6_0r   c                s   R V P                   ,          pV P                  P                  R4       WP                  9   Ed   V P                   R,           pV P                  P                  RRV P                   /,          4       V P                  V,           F  pV P                  P                  RRVRR RV P                   /,          4       V P                  P                  RRV P                   R	R
P                  V.V P                  V,          ,           4      /,          4       K  	  V P                  P                  RV P                   ,          4       R# R# )z	%s_sudo_tz

.SH SUDO
rc   z
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
ZadminNa_  
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.

Zrolesr-   z7
The SELinux type %s_t is not allowed to execute sudo.
r"   )rU   r?   r=   r   rn   r.   )rG   Zsudotyper(   Z	adminroler   r   r   ZManPage._can_sudo  s'   0  	 zz!??T)DGGMM  t  ! "--d33	  	#28	9 :   t4&4;K;KD;Q2Q)RST U 4,  
oo A "r   c                s   V P                   P                  R 4       RV P                  9   d-   V P                   P                  RV P                  ,          4       RV P                  9   d-   V P                   P                  RV P                  ,          4       RV P                  9   d/   V P                   P                  RV P                  ,          4       R# R# )z
.SH USER DESCRIPTION
Zunconfined_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.
Zunpriv_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.
N)r?   r=   r*   rU   rM   rN   r   r   ZManPage._user_attribute0  s      	 !DOO3GGMM 
oo  $//1GGMM 
oo  DOO+GGMM 
oo  ,r   c                8   R V P                   9   d   V P                  P                  R4       R V P                  9   d/   V P                  P                  RV P                  ,          4       R# V P                  P                  RV P                  ,          4       R# R# )Zx_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.
Nrg   r?   r=   r*   rU   rM   rN   r   r   ZManPage._xwindows_loginC  s|    ,,,GGMM   T__, 
oo   
oo  -r   c                r   )r   z
.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.
Nr   rM   rN   r   _terminal_loginZManPage._terminal_loginQ  s|    !4!44GGMM   "T__4 
oo   
oo  5r   c           	     s   ^ RI Hp V P                  P                  R4       R EFP  pVP	                  V P
                  VR4      p\        V4      ^ 8  dz   V P                  P                  RV P                  : RV: R24       V FE  pW4,           F6  w  rVV P                  P                  RR	P                  V4      ,          4       K8  	  KG  	  VP	                  V P
                  RR
4      p\        V4      ^ 8  g   K  V P                  P                  RV P                  ,          4       V FE  pW4,           F6  w  rVV P                  P                  RR	P                  V4      ,          4       K8  	  KG  	  EKS  	  R# )r   )networkz
.SH NETWORK
r   Z	name_bindz
.TP
The SELinux user z&_u is able to listen on the following z ports.
z
.B %s
r   Zname_connectzJ
.TP
The SELinux user %s_u is able to connect to the following tcp ports.
Nr   )	r   r   r?   r=   Zget_network_connectru   r/   rU   r.   )rG   r   ZnetZportdictr   r   r   r   r   r   ZManPage._network_  s5   $  	 "C22499c;OH8}q    "A$,KK '	hhuo'  %0 "
 22499e^TH8}q     "A$,KK '	hhuo'  %0 "% "r   c                sR  a  \        \        V 3R  l\        P                  ! 4       4      4      pS P                  P                  R4       Ve/   S P                  P                  RS P                  ,          4       R# S P                  P                  RS P                  ,          4       R# )c                 s   < V R ,          SP                   8H  ;'       dU    V R,          R8H  ;'       dA    V R,          R8H  ;'       d-    \        . RO4      P                  \        V R,          4      4      # )r   r   Zuser_home_typer   r   r   )ZioctlZreadZgetattrZexecuteZexecute_no_transr<   )ru   r   r   r   r   r   r   Z$ManPage._home_exec.<locals>.<lambda>}  sy    hK499$ r rhK++r rgJ& r r ST]]^abcdnbo^pqrr   z
.SH HOME_EXEC
Nz;
The SELinux user %s_u is able execute home content files.
z?
The SELinux user %s_u is not able execute home content files.
)r   r   r   r   r?   r=   rU   )rG   r   s   f r   r   ZManPage._home_exec|  s      r
 ((*, - 	  	 GGMM 
oo 
 GGMM 
oo r   c                sb    V P                   P                  R RV P                  /,          4       R# )a  
.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

ru   N)r?   r=   ru   rM   rN   r   r   ZManPage._transitions  s*     . tyy/ 	r   c           	     sJ   V P                   P                  R RV P                  /,          4       V P                   P                  RRV P                  RV P                  /,          4       . pV P                   F?  pV P                  R,           V P                  V,          9   g   K.  VP                  V4       KA  	  \        V4      ^ 8  dZ   Rp\        V4      ^8  dF   RpV P                   P                  RRP                  V4      : R	V: R
V P                  : R24       R# R# R# )zd.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

r   rc   r   r   z

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 r   z rolez can transition to the z
_r role.

N)r?   r=   rU   r   rn   r   r/   r.   )rG   Ztrolesr6   r   r   r   r   ZManPage._role_header  s    |12 	3 	 )R tyy&$//2S)3 )	4T !!A%)9)9!)<<a  " v;?F6{Q yy&$//	3 	4  r   )#rg   rh   rf   rm   ri   rj   rk   rl   r   r*   rs   r   r   r   r   rU   r#   rq   ro   r?   rT   rw   r   r   re   r   r   r(   rn   r   rt   rd   ru   r   rr   )z/tmpr3   FF)-rW   rX   rY   rZ   r[   r   r   rB   rA   rH   rv   r   rx   r|   ry   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r\   r]   r^   r_   r   r    r    Y  s      Ly)KOM54n "">@&
'&'$&
)(0'2)5VjX	 D(T!F!.`
+!Z'R&:(4@4 @4r   )r    r   r)   )Zamavis_tZclamd_tZ
clamscan_tZfreshclam_t)Zrgmanager_tZ
corosync_tZ	aisexec_tZpacemaker_t)r`   )Z__all__r5   rp   r   rP   Ztimer   rz   r   ZstrftimeZgmtimeZintZenvironr   r   r   r   r   r   r   r   r!   r#   r)   r   r,   r2   r8   r@   r   r    r    r   r   <module>r      s)  0 5    	  B E 	8 	:	 wi8*g	?RT[^d]egqt~s  BI  LR  KS  T
X
==T[[BJJNN.		<=&? @0 	,  , 	/

e1 e1PQ4 Q4r   