Sindbad~EG File Manager
3
�Qf.S � # @ s� d dl mZ yd dlmZ ej� W n Y nX ddddddgZd d lZd d lZd d lZyd d
l m
Z
W n ek
r� d d
lm
Z
Y nX d d l
Z
d aejjddd
�Zdddd�d
ddd�dddd�ddd�dddd�d
ddd�dddd�dddd�dddd�dddd�dddd�d�d d!d"d�id#d$d�d%d&d�d'd(d�d)�d*d+dd�id,ddd�d-ddd�d.ddd�d/�d,ddd�d-ddd�d.ddd�d/�d0dd�d
dd�d1d2d�dd3d�d4�d5d6dd�iejjd7d8�ddd�d9d:d�d;�ejjd7d8�ddd�d<d:d�d;�d=ddd�d>ddd�d?�d@dAd�dBdCd�dD�dEd@dFd�idGdHd�dIdJd�dK�dLdMd�dNdOd�dPdQd�dRdSd�ejjd0dT�dUd�dV�dWdXd�dYdZd�d[�d\d]d^dd�id_�Zd`d� Zdadb� Zd{dcdd�Zd|ded�Zd}dfd�Zdgd� Ze
jdh�Zdid� Zdjd� Zd~dkdl�Zdmdn� Zedok�r�dpdq� Z y$ejej!drd � dsdtdug�\Z"Z#W n( ej$k
�rl e � ej%dv� Y nX dZ&x8e"D ]0\Z'Z(e'dk�r�dZ&e'd�k�rxe � ej%� �qxW e&�r�ee� ne� d S )�� )�print_function)�standard_library�config_init�
get_config�
get_option�
set_config�parse_config_setting�config_has_sectionN)�SafeConfigParserz/etc/setroubleshootz%s.confZsetroubleshootz/var/run/setroubleshootd.pid� F)�value�description�readOnlyTz3.3.26z https://pagure.io/setroubleshootzURL of project website)r r
z1.1z/internationalization (i18n) translation catalogz/usr/share/localez9internationalization (i18n) translation catalog directoryzutf-8z.internationalization (i18n) encoding (codeset)z/usr/share/setroubleshootZsetroubleshoot_icon)Zpid_fileZpkg_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/var/run/audit_eventszLunix domain socket used to listen for audit messages (binary audit protocol)z/var/run/audispd_eventszNunix domain socket used to listen for audit messages (textural audit protocol)Z60zgnumber 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/pluginsz!org.fedoraproject.Setroubleshootdz"/org/fedoraproject/Setroubleshootdz&org.fedoraproject.SetroubleshootdIface)Zbus_nameZobject_pathZ interfacez/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)Zdatabase_dir�filenameZ
max_alertsZ
max_alert_ageZdefault_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"
)�pathZaddress_listz{unix}%(path)s hostnameZ2048�5)Zbuf_sizeZtimeoutZwarningz�
setroubleshootd logging level. Levels are the same as in the python logging
module, but are case insenstive. The defined levels in severity order
are:[CRITICAL, ERROR, WARNING, INFO, DEBUG]�Truez/True|False, log full report analysis to journal)�levelZlog_full_reportr z�
sealert logging level. Levels are the same as in the python logging
module, but are case insenstive. 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.)Zclient_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 #. )Z smtp_hostZ smtp_portZfrom_addressZsubjectZrecipients_filepathz&https://pagure.io/docs/setroubleshoot/zURL to user help informationz1http://bugzilla.redhat.com/bugzilla/enter_bug.cgizURL used to report bugs)Zhelp_urlZbug_report_urlZanalyze�FalsezPrint plugin report)ZgeneralZhelper_appsZauditZpluginsZsession_dbusZsystem_dbusZdatabaseZ
connectionZlisten_for_clientZclient_connect_toZsocketZsetroubleshootd_logZsealert_log�accessZemail�helpZtestc C s t t�ad S )N)�read_configuration�defaults�_cfg� r r �/usr/lib/python3.6/config.pyr Z s c C s� t � }y|jt� W n6 tk
rJ } ztdt|f tjd� d S d }~X nX t| j� �}x�|D ]�}|j |�sv|j
|� xtt| | j� �D ]`\}}|d }|jdd�}|j
||�s�|j|||� q�|r�td||f tjd� |j|||� q�W q^W |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 r r r r _ s&