HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/setroubleshoot/__pycache__/config.cpython-39.opt-1.pyc
a

U+e�R�@shgd�ZddlZddlZddlZddlmZddlZdaej�	ddd�Z
ddd	d
�dddd
�dddd
�d
dd�dddd
�dddd
�dddd
�dddd
�dddd
�dddd
�dddd
�d�dddd�iddd�ddd�d d!d�d"�d#d$dd�id%ddd
�d&ddd
�d'ddd
�d(�d)ddd
�d*ddd
�d'ddd
�d(�d+dd�ddd�d,d-d�dd.d�d/�d0d1dd�iej�	d2d3�dd	d
�d4d5d�d6�ej�	d2d3�dd	d
�d7d5d�d6�d8ddd
�d9ddd
�d:�d;d<d�d=d>d�d?�d@d;dAd�idBdCd�dDdEd�dF�dGdHd�dIdJd�dKdLd�dMdNd�ej�	d+dO�dPd�dQdRd�dS�dTdUd�dVdWd�dX�dYdQdZdd
�id[�Zd\d]�Zd^d_�Z
d{d`da�Zd|dbdc�Zd}ddde�Zdfdg�Ze�dh�Zdidj�Zdkdl�Zd~dmdn�Zdodp�Zedqk�r^drds�Zz$e�ejdtd�dudvdwg�\ZZWn&ej�ye�e�dx�Yn0d	ZeD]0\Z Z!e dyv�r2dZe dzv�re�e���qe�rdee�ne�dS))�config_init�
get_config�
get_option�
set_config�parse_config_setting�config_has_section�N)�ConfigParserz/etc/setroubleshootz%s.confZsetroubleshootz/var/run/setroubleshootd.pid�F)�value�description�readOnlyTz3.3.32z https://pagure.io/setroubleshootzURL of project website)r
rz1.1z/internationalization (i18n) translation catalogz/usr/share/localez9internationalization (i18n) translation catalog directoryzutf-8z.internationalization (i18n) encoding (codeset)z/usr/share/setroubleshootZsetroubleshoot_icon)Zpid_file�pkg_nameZpkg_versionZproject_urlZrpc_versionZi18n_text_domainZi18n_locale_dirZ
i18n_encodingZdata_dirZ
config_dirZ	icon_nameZweb_browser_launcherz/usr/bin/xdg-openz1Helper application to launch web browser on a URLz/run/audit_eventszLunix domain socket used to listen for audit messages (binary audit protocol)z/run/audispd_eventszNunix domain socket used to listen for audit messages (textural audit protocol)Z60zh
number of seconds to wait before trying to connect to audit socket again in
the event of socket failure)Zbinary_protocol_socket_pathZtext_protocol_socket_pathZretry_intervalZ
plugin_dirz!/usr/share/setroubleshoot/pluginszorg.fedoraproject.sealertz/org/fedoraproject/sealertz&org.fedoraproject.SetroubleshootdIface)Zbus_nameZobject_pathZ	interfacez!org.fedoraproject.Setroubleshootdz"/org/fedoraproject/Setroubleshootdz/var/lib/setroubleshootZ50z�
Keep no more than this many alerts in the database. Oldest alerts based on
the alert's last seen date will be purged first. Zero implies no limita;
Purge any alerts whose age based on its last seen date exceeds this threshold.
Age may be specified as a sequence of integer unit pairs. Units may be one of
year,month,week,day,hour,minute,second and may optionally be plural.
Example: '2 weeks 1 day' sets the threshold at 15 days.
An empty string implies no limit)Zdatabase_dir�filenameZ
max_alertsZ
max_alert_ageZdefault_portZ69783z/var/run/setroubleshootZsetroubleshoot_serverz{unix}%(path)sa_
List of socket addresses server should listen on for client
connections. Addresses should not contain any whitespace. Each address
is of the form "[{family}]address[:port]" where [] indicates the value
is optional. Valid values for family are inet or unix, if the family
is absent it defaults to inet. If the family is unix the address is
interpreted as a file path. If the family is inet the address is
interpreted as either a host name or IP address. As a special case if
the inet address is "hostname" the current hostname will be
substituted. If the family is inet the address may optionally be
followed by a colon (:) and a port number. If the port number is
absent in the address it defaults to the port specified in this config
section. Example, to listen on the local unix domain socket and
provide remote connections use this "{unix}%(path)s, hostname"
)�pathZaddress_listz{unix}%(path)s hostnameZ2048�5)Zbuf_size�timeoutZwarningz�
setroubleshootd logging level. Levels are the same as in the python logging
module, but are case insensitive. The defined levels in severity order
are:[CRITICAL, ERROR, WARNING, INFO, DEBUG]�Truez/True|False, log full report analysis to journal)�levelZlog_full_reportrz�
sealert logging level. Levels are the same as in the python logging
module, but are case insensitive. The defined levels in severity order are:
[CRITICAL, ERROR, WARNING, INFO, DEBUG]�*z�
Comma-separated list of users allowed to run the client and connect to
the local fault server and therefore see security denials.
Also accepts '*' to allow all users to connect.�roota|
Comma-separated list of users allowed to run the fix commands with
root privileges. Members of this list can execute the fix commands
specified in any alert. The command is executed with root privileges
so you should be very caeful who you add to this list as you are
granting them significant power to alter the security settings of this
system. The wildcard '*' is NOT allowed.)Zclient_usersZ
fix_cmd_usersZ	localhostzThe SMTP server addressZ25zThe SMTP server portZSELinux_TroubleshootzThe From: email headerzSELinux AVC AlertzThe Subject: email headerZemail_alert_recipientsz{
Path name of file with email recipients. One address per line, optionally
followed by enable flag. Comment character is #.�FalsezRSet 'True' to send emails using sendmail instead of smtp_host. Default is 'False'.)Z	smtp_hostZ	smtp_portZfrom_addressZsubjectZrecipients_filepathZuse_sendmailz&https://pagure.io/docs/setroubleshoot/zURL to user help informationz1http://bugzilla.redhat.com/bugzilla/enter_bug.cgizURL used to report bugs)Zhelp_urlZbug_report_urlZanalyzezPrint plugin report)ZgeneralZhelper_apps�auditZpluginsZsession_dbusZsystem_dbusZdatabaseZ
connectionZlisten_for_clientZclient_connect_toZsocketZsetroubleshootd_logZsealert_log�accessZemail�help�testcCstt�adS�N)�read_configuration�defaults�_cfg�rr�9/usr/lib/python3.9/site-packages/setroubleshoot/config.pyrWsrc	
Cs�t�}z|�t�Wn<tyP}z$tdt|ftjd�WYd}~dSd}~00t|���}|D]�}|�	|�sz|�
|�t||���D]`\}}|d}|�dd�}|�
||�s�|�|||�q�|r�td||ftjd�|�|||�q�qb|S)Nz"error parsing config file (%s): %s��filer
rFz*error [%s] %s cannot be set in config file)r�read�CFG_FILE�	Exception�print�sys�stderr�list�keys�has_section�add_section�items�getZ
has_option�set)	r�cfg�eZdefault_sectionsZdefault_sectionZdefault_option�
propertiesr
rrrr r\s&

rcCslz�|dus|tur|WS|tur*t|�WS|tur�t|t�rB|WSt|t�rVt|�WS|��dvrhWdS|��dvrzWdStd|��nh|tur�t|�WS|dkr�|WSzddlm}|�	d	||�Wn(t
y�td
||ftj
d�Yn0Wntt�yf}zZz ddlm}|�	d|||�Wn,t
�yPtd
|||ftj
d�Yn0WYd}~n
d}~00dS)N)�true�tZyes�yZonT)Zfalse�f�no�nZoffFzcannot convert %s to boolean�rawr��log_cfgzunknown type %s for option %sz#error unknown type %s for option %sr!z!unknown type %s for option %s: %sz'error unknown type %s for option %s: %s)�str�int�bool�
isinstance�lower�
ValueError�float�setroubleshoot.logr;�error�ImportErrorr&r'r(r%)r
�cfg_typer;r1rrr �convert_cfg_typews>




 4rGcCsFd}|dur"||vr"t||�}nt|�r6t|||�}|durB|}|Sr)rGrr)�section�nameZ
default_value�kwdsZoption_typer
rrr r�srcCsPtdurdSz�|dus|tur,t�||�WS|turBt�||�WS|turXt�||�WS|turnt�||�WS|dkr�tj||dd�WSz ddl	m
}|�d|||�Wn*ty�t
d|||ftjd�Yn0Wntt�yJ}zZz ddl	m
}|�d	|||�Wn,t�y4t
d
|||ftjd�Yn0WYd}~n
d}~00dS)Nr9T)r9rr:z1unknown type = %s getting %s option in %s sectionz7error unknown type = %s getting %s option in %s sectionr!z&cannot get %s option in %s section: %sz,error cannot get %s option in %s section: %s)rr<r.r=Zgetintr>Z
getbooleanrBZgetfloatrCr;rDrEr&r'r(r%)rH�optionrFr;r1rrr r�s2"4rc
Cszz4tdurWdSt�|�s$t�|�t�|||�Wn@tyt}z(td||||ftjd�WYd}~dSd}~00dS)NFz:Cannot set config: section='%s' option='%s' value='%s': %sr!T)rr+r,r/r%r&r'r()rHrKr
r1rrr r�s

rz%([^.=]+?)\s*\.\s*([^.=]+?)\s*=\s*(.*)cCs�t�|�}|r.|�d�}|�d�}|�d�}nFzddlm}|�d|�Wn$tyntd|tj	d�Yn0d	Sz ddlm}|�
d
|||�Wn*ty�td
|||ftj	d�Yn0t|||�dS)N���rr:z4could not parse '%s', must be 'section.option=value'z;error: could not parse '%s', must be 'section.option=value'r!Fz3setting config: section='%s' option='%s' value='%s'T)�config_setting_re�search�grouprCr;rDrEr&r'r(�debugr)Zcfg_setting�matchrHrKr
r;rrr r�s$


rcCs�tdurdSzt�|�WSty�}zVzddlm}|�d||�Wn(tyntd||ftj	d�Yn0WYd}~dSd}~00dS)Nrr:zconfig_has_section(%s): %sz!error: config_has_section(%s): %sr!F)
rr+r%rCr;rDrEr&r'r()rHr1r;rrr r�srcCsddl}|jdddd�}t|���}|��|D]�}d}t||���D]$\}}|�dd�}	|sd|	sH|d7}qH|dkr0td|�t||���D]x\}}|d	}
|�dd�}	|�d
d�}|	r�|s�q�|s�d}t|�d
||��|	r�td|
�ntd||
f�t�q�q0dS)Nr�Nz# )�width�initial_indent�subsequent_indentrFrLz[%s]r
rr	zNo Description Availablez%s: z# READ ONLY, default = "%s"z%s = %s)	�textwrapZTextWrapperr)r*�sortr-r.r&�fill)rZshowReadOnlyrX�wrap�sectionsrHZvisibleOptionsrKr2rr
rrrr �
dump_defaultss6�
r]cCs\|��}|��|D]B}|�|�}|��|D] }t||�}td|||f�q.t�qdS)Nz[%s] %s = %s)r\rY�optionsrr&)r0r\rHr^rKr
rrr �dump_configuration,s

r_�__main__cCstd�dS)Nz5
    -d generate default config file
    -h help
    )r&rrrr �usage<srarLZdhrrrM)z-dz
--defaults)z-hz--help)N)NNN)N)F)"�__all__�getoptr'�osZconfigparserr�rerr�joinr$rrrrGrrr�compilerOrrr]r_�__name__ra�argvZopts�args�GetoptError�exitZdo_dump_defaults�o�arrrr �<module>s�������������9�������������������������������������������������������1
(

#

!
$