HEX
Server: Apache
System: Linux hp3-stn-1011028.hostingp3.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: csh958633 (951153)
PHP: 8.3.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //lib64/python2.7/site-packages/setroubleshoot/server.pyc
�
��^c@s3dddddgZddlZej�ddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZ
ddlmZmZedd	�Zedd
�ZiZe
jd8kr�eed<nejd
edee�ejd
edede�Zy
ejZWnek
rYejZnXddlmZddlmZmZm Z m!Z!ddl"TddlmZddl"m#Z#ddl$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ddl,m-Z-m.Z.m/Z/m0Z0ddl1m2Z2m3Z3m4Z4ddl5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;e:d�d�Z<d�Z=d�Z>d�Z?edd�Z@edd �ZAedd!�ZBejC�ZDeDjEe@�d"�ZFdaHdaIdaJed#d$�ZKedd%�ZLedd&�ZMe>�ZNdeOfd'��YZPeP�ZQd(efd)��YZRde-fd*��YZSd+eSe2e3e4fd,��YZTd-eOfd.��YZUddlVTddl5ZWd/ejXjYfd0��YZZd1�Z[d2d9d3��YZ\ddl]Z]ddl^j_Z_d4�Z`d5d6�Zaebd7kr/ea�ndS(:tRunFaultServertClientConnectionHandlertget_host_databasetsend_alert_notificationtConnectionPooli����N(tparse_config_settingt
get_configtgeneralti18n_text_domainti18n_locale_diritunicodetdomaint	localedirtfallback(tServerAccess(tPluginReportReceivertSETroubleshootDatabasetTestPluginReportReceivert
AnalyzeThread(t*(R(tAuditRecordReceiver(tProgramErrortERR_NOT_AUTHENTICATEDtERR_USER_LOOKUPtERR_USER_PROHIBITEDtERR_USER_PERMISSIONt
ERR_FILE_OPENtERR_DATABASE_NOT_FOUND(t
RpcChanneltConnectionStatetget_socket_list_from_configtListeningServer(tSETroubleshootServerInterfacet%SETroubleshootDatabaseNotifyInterfacetSEAlertInterface(tget_hostnametmake_database_filepatht!assure_file_ownership_permissionstget_identitytlog_initt	log_debugtsetroubleshootd_logcCs^td|�ddlj}|tjkrDtd�|j�dSddl}|j�dS(Nsreceived signal=%si����sreloading configuration file(R(tsetroubleshoot.configtconfigtsignaltSIGHUPtconfig_inittsystexit(tsignumtframeR+R/((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt
sighandlerms

cCs2td|�tjtjd�tjd�dS(Nsreceived signal=%ss=/sys/fs/selinux/policy is in use by another process. Exiting!i(R(tsyslogtLOG_ERRR/R0(R1R2((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytpolling_failled_handlerwscCsDddl}t�}tj�}t|j��}d|||fS(Ni����s%s:%s:%s(ttimeR#tostgetpidtstr(R7thostnametpidtstamp((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytmake_instance_id}s
	cCstS(N(t
host_database(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�stsystem_dbustbus_nametobject_patht	interfacecCsptjjttd�}|j|j�|j|j�tj	|�x$t
jd�D]}|j|�qUWdS(Ntalerttsealert(
tdbustlowlevelt
SignalMessagetdbus_system_object_pathtdbus_system_interfacetappendtleveltlocal_idt
system_bustsend_messagetconnection_pooltclientsRD(tsiginfoRDtclient((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�s
temailtrecipients_filepathtpkg_versiontrpc_versioncBs;eZd�Zd�Zd�Zdd�Zdd�ZRS(cCs
i|_dS(N(tclient_pool(tself((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt__init__�scCs5|jj|�r$td|�dSd|j|<dS(Ns.add_client: client (%s) already in client pool(RXthas_keyR(tNone(RYthandler((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt
add_client�scCs2|jj|�s$td|�dS|j|=dS(Ns-remove_client: client (%s) not in client pool(RXR[R((RYR]((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt
remove_client�sccsCx<|jD]1}|dkr$|Vq
|j|kr
|Vq
q
WdS(N(RXR\tchannel_type(RYR`RS((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRQ�s
cCs4x-|jD]"}|j|kr
|j�q
q
WdS(N(RXR`tclose_connection(RYR`RS((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt	close_all�sN(t__name__t
__module__RZR^R_R\RQRb(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�s
			tAlertPluginReportReceivercBseZd�Zd�ZRS(cCstt|�j|�dS(N(tsuperReRZ(RYtdatabase((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRZ�scCs�tt|�j|�}tdk	r�g}xctjD]X}d|j}|j||j�}|dkr4t	d|j
�|j|j�q4q4Wt|�r�ddl
m}|||�q�nt	d�ddlm}tjtj|j�td�|j�x4|jjD]&}|jd	kr|jd
}	PqqWtddt�rktjj|j�d
|	�nx3|j D](}
|j|
j!�}|dkru|SquWt"|�|S(Nsemail:%stignoresEmail: siginfo.sig=%si����(temail_alertssending alert to all clients(thtml_to_texts1 For complete SELinux messages run: sealert -l %stAVCR<R)tlog_full_reportt
OBJECT_PID(#RfRetreport_problemtemail_recipientsR\trecipient_listtaddresstevaluate_filter_for_usertfilter_typeR(tsigRKtlentsetroubleshoot.email_alertRitsetroubleshoot.html_utilRjR4R5tsummaryt_RMtaudit_eventtrecordstrecord_typetfieldsRtbooltsystemdtjournaltsendtformat_texttuserstusernameR(RYRRtto_addrst	recipientR�tactionRiRjtaudit_recordR<tu((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRn�s6

*

(RcRdRZRn(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRe�s	cBs#eZd�Zd�Zd�ZRS(cCs9tj|d�|j�|_|jjd|j�dS(NREtchanged(RRZtcopytsocket_addresstconnection_statetconnectton_connection_state_change(RYR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRZ�scCsvtd|jj||j|�|j|�|jf�|tj@rUtj|�n|tj@rrtj	|�ndS(Ns]%s.on_connection_state_change: connection_state=%s flags_added=%s flags_removed=%s address=%s(
R(t	__class__Rctflags_to_stringR�RtOPENRPR_R^(RYR�tflagstflags_addedt
flags_removed((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s
8

cCsJ|jjtj@rtS||j_|jjtj�|j|j	�dS(N(
R�R�RR�tTrueR�tsockettupdatetio_watch_addthandle_client_io(RYR�R�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytopen�s
(RcRdRZR�R�(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�s			t&SetroubleshootdClientConnectionHandlercBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dd
�Zd�ZRS(cCsgtj||�t�|_|jd|�|jd|�t�|_d|_d|_	d|_
dS(NtSETroubleshootServerR(RRZRRgtconnect_rpc_interfaceRtaccessR\R�tuidtgid(RYR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRZs		cCs�td|jj||j|�|j|�|jf�|tj@rUtj|�n|tj@r�|j	j
|jj�\|_|_
td|jj|j|j
f�tj|�ndS(Ns]%s.on_connection_state_change: connection_state=%s flags_added=%s flags_removed=%s address=%ssF%s.on_connection_state_change: open, socket credentials: uid=%s gid=%s(R(R�RcR�R�RR�RPR_R�tget_credentialsR�R�R�R^(RYR�R�R�R�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�s8

$#cCsJ|jjtj@rtS||j_|jjtj�|j|j	�dS(N(
R�R�RR�R�R�R�R�R�R�(RYR�R�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�$s
cCs^|jjtj@s"tt��nt�}|jj|krG|jgStt	d|��dS(Nsdatabase (%s) not found(
R�R�Rt
AUTHENTICATEDRRRt
propertiestnameR(RYt
database_nameR?((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt
database_bind.s	
cCs�td|||f�|t|j�krNttdd|j|f��n|dkrcd}nd}|jj||�s�tt��n||_	||_
||_|jj
|�|_|jdkr�|jj|�n|jjtj�ttgS(Nslogon(%s) type=%s username=%stdetails)uid=%s does not match logon username (%s)RERS(R(R&R�RRR\R�tuser_allowedRR`tchannel_nameR�Rgtget_usertusertadd_userR�R�RR�RVRW(RYttypeR�tpasswordt	privilege((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytlogon8s "				cCs)|jjtj@s"tt��ntgS(N(R�R�RR�RRRo(RY((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytquery_email_recipientsPscCsGtd|�|jjtj@s0tt��n|atjt	�dS(Nsset_email_recipients: %s(
R(R�R�RR�RRRotwrite_recipient_filetemail_recipients_filepath(RYt
recipients((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytset_email_recipientsVs
cCsFtd|�|jjtj@s0tt��n|jj|�}dS(Nsdelete_signature: sig=%s(
R(R�R�RR�RRRgtdelete_signatureR\(RYRtRR((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�cs
cCsBtd�|jjtj@s,tt��n|jj�}|gS(Ntget_properties(	R(R�R�RR�RRRgR�(RYR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�ls

cCsRtd||f�|jjtj@s6tt��n|jj||�}|gS(Ns)evaluate_alert_filter: username=%s sig=%s(	R(R�R�RR�RRRgtevaluate_alert_filter(RYRtR�R�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�us
cCsItd|�|jjtj@s0tt��n|jj|�}|gS(Nslookup_local_id: %s(	R(R�R�RR�RRRgtlookup_local_id(RYRMRR((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�~s
cCsItd|�|jjtj@s0tt��n|jj|�}|gS(Nsquery_alerts: criteria=%s(	R(R�R�RR�RRRgtquery_alerts(RYtcriteriatsigs((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s
tcCs�td|||f�|jjtj@s9tt��n||jkrpttdt	d�|j|f��n|j
j||||�dS(Ns.set_filter: username=%s filter_type=%s sig=
%sR�s)The user (%s) cannot modify data for (%s)(
R(R�R�RR�RRR�RRyRgt
set_filterR\(RYRtR�Rstdata((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s(cCsYtd||||f�|jjtj@s<tt��n|jj||||�dS(Ns2set_user_data: username=%s item=%s data=%s sig=
%s(
R(R�R�RR�RRRgt
set_user_dataR\(RYRtR�titemR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s
(RcRdRZR�R�R�R�R�R�R�R�R�R�R�R�R�(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�s	
		
	
			
										
tClientNotifiercBseZd�Zd�ZRS(cCs
||_dS(N(RP(RYRP((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRZ�scCs1x*|jjd�D]}|j||�qWdS(NRE(RPRQtsignatures_updated(RYR�R�RS((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s(RcRdRZR�(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s	tSetroubleshootdDBusObjectcBs�eZdd�Zd�Zejje�d��Zejj	e�d��Z
ejj	eddddd	d
�d��Zdd
�Zejj	eddddd	d�d��Z
ejj	eddddd	d�d��Zejj	eddddd	d�d��Zd�Zejj	eddddd	d�d��Zejj	eddddd	d�d��Zejj	eddddd	d�d��Zejj	eddd	d�d��Zejj	e�d��Zdd�ZRS(i
cCs�tjjj|tj�|�d|_||_|j|j�td|�||_	||_
ttj�|_
t�|_dS(Nisdbus __init__ %s called(RFtservicetObjectRZt	SystemBustconn_ctrttimeouttalarmR(tqueuetreceivertAuditRecordReadertTEXT_FORMATt
record_readerRtrecord_receiver(RYRBtanalysis_queuetalert_receiverR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRZ�s				cCs�ygtjjdtj�tj�df�r>td��nt|�rf|jj	||j
f�nWn,tk
r�}tjtjt
|��nXdS(Ns%%s%s/modules/active/disable_dontauditissSetroubleshoot can not analyze AVCs while dontaudit rules are disabled, 'semodule -B' will turn on dontaudit rules.(R8tpathtexiststselinuxtselinux_pathtselinux_getpolicytypet
ValueErrort
verify_avcR�tputR�R4R5R:(RYtavcte((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytadd�s, cCsdS(N((RYtreason((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytrestart�scCs7|jd�|jd7_td|j�td�S(Niis)dbus iface start() called: %d ConnectionstStarted(R�R�R(Ry(RY((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytstart�s
tsender_keywordtsendertin_signaturetst
out_signaturetiicCs�t|jj|��}t�}d}g}xH|jd�j�D]1}|j|�}|dkrC|j|�qCqCW|jt	�d}	d}
xR|D]J}|	d7}	|j
dkr�|
d7}
n|j|kr�d}
d}	q�q�W|	|
fS(NR�RRhiitred(R&t
connectiont
get_unix_userRR�tsiginfosRrRKtsorttcompare_sigRLRM(RYtlast_seen_idR�R�RgR�t
signaturesRtR�tcountR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt
check_for_new�s&	




tdisplayc
Cs�t|jj|��}t�}tjjt|d��}|jd�j	}g}x]|D]U}	|	j
|krwq\n|	j|�|kr\|j|	j
|	j�|	jf�q\q\W|S(Ni@BR(R&R�R�Rtsetroubleshoottutilt	TimeStamptfloatR�tsignature_listtlast_seen_dateRrRKRMRxtreport_count(
RYtsinceR�talert_actionR�Rgtsince_alertstdatabase_alertstalertsRD((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt_get_all_alerts_since�s	
)ttsa(ssi)cCs|j||�S(N(R(RYR�R�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytget_all_alerts_since�sR�cCs|jd|�S(s�
        Return array of *local_id*'s, *summary*'s, and *report_count*'s of all current alerts in a setroubleshoot database

        returns list of:
        * `local_id(s)`: a report id in a setroubleshoot database
        * `summary(s)`: a brief description of an alert. E.g. `"SELinux is preventing /usr/bin/bash from ioctl access on the unix_stream_socket unix_stream_socket."`
        * `report_count(i)`: count of reports of this alert
i(R(RYR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytget_all_alertss
cCs|jd|dd�S(s�
        Return array of *local_id*'s, *summary*'s, and *report_count*'s of all alerts which a user set to be ignored by a user

        returns list of:
        * `local_id(s)`: a report id in a setroubleshoot database
        * `summary(s)`: a brief description of an alert. E.g. `"SELinux is preventing /usr/bin/bash from ioctl access on the unix_stream_socket unix_stream_socket."`
        * `report_count(i)`: count of reports of this alert
iR�Rh(R(RYR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytget_all_alerts_ignoreds
cCsEy|j|�}Wntk
r.}|�nXt|j��}|S(N(R�RtnextR�(RYRMRgR�R�RD((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt
_get_alerts
sssiasa(ssssbbi)ttsc	Csat|jj|��}t�}|j||�}|j�|jj}g|D]}|j�^qP}|j	�\}	}
g}x�|
D]y\}}
|j
|j|j||
��|j|j
||
��|j|j||
��|j|j|j|jf�q�W|j|j�|j||t|jjd��dt|jjd��d|jp]dfS(sr
Return an alert with summary, audit events, fix suggestions

##### arguments

* `local_id(s)`: an alert id

##### return values

* `local_id(s)`: an alert id
* `summary(s)`: a brief description of an alert. E.g. `"SELinux is preventing /usr/bin/bash from
  ioctl access on the unix_stream_socket unix_stream_socket."`
* `report_count(i)`: count of reports of this alert
* `audit_event(as)`: an array of audit events (AVC, SYSCALL) connected to the alert
* `plugin_analysis(a(ssssbb)`: an array of plugin analysis structure
 * `if_text(s)`:
 * `then_text(s)`
 * `do_text(s)`
 * `analysis_id(s)`: plugin id. It can be used in `org.fedoraproject.SetroubleshootFixit.run_fix()`
 * `fixable(b)`: True when an alert is fixable by a plugin
 * `report_bug(b)`: True when an alert should be reported to bugzilla
 * `priority(i)`:  An analysis priority. Typically the value is between 1 - 100.
* `first_seen_date(t)`: when the alert was seen for the first time, number of microseconds since the Epoch
* `last_seen_date(t)`: when the alert was seen for the last time, number of microseconds since the Epoch
* `level(s)`: "green", "yellow" or "red"
s%si@BR�(R&R�R�RRt%update_derived_template_substitutionsRzR{tto_texttget_pluginsRKt
substitutetget_if_textt
get_then_texttget_do_texttanalysis_idtfixablet
report_bugtpriorityRMRxR�tinttfirst_seen_datetformatR�RL(RYRMR�R�RgRDR�teventtaudit_eventsttotal_priorityt
alert_pluginstpluginstplugintargs((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt	get_alert#s,	
tsstbcCswyht|jj|��}t�}|j||�}ddlm}|j|j|||d�t
SWntSXdS(s�
Sets a filter on an alert. The alert can be "always" filtered, "never" filtered or "after_first" filtered.

##### arguments

* `local_id(s)`: an alert id
* `filter_type(s)`: "always", "never", "after_first"

##### return values

* `success(b)`:
i����(tmap_filter_name_to_valueN(R&R�R�RRtsetroubleshoot.signatureRR�RtR\R�tFalse(RYRMRsR�R�RgRDR((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�\s	cCsBy3t�}|j||�}|j|j�tSWntSXdS(sz
Deletes an alert from the database.

##### arguments

* `local_id(s)`: an alert id

##### return values

* `success(b)`:
N(RRR�RtR�R!(RYRMR�RgRD((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytdelete_alertts
	c
CsA|jd�|jd7_td||jf�x�|jjt|��D]g\}}}}}t|||||�}|j�x-|jj|�D]}|j	t
|��q�WqLWx^|jjd�D]J}y|j	t
|��Wq�tk
r}	t
j
t
jd|	�q�Xq�W|jd8_|j|j�td�S(Niis#dbus avc(%s) called: %d ConnectionssUnable to add audit event: %sRk(R�R�R(R�tfeedR:tAuditRecordtaudispd_rectifyR�R�RktflushR�R4R5R�Ry(
RYR�R|tevent_idt	body_textR}tline_numberR�RzR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s 
.
cCs4|jd8_td|j�|j|j�dS(Nis*dbus iface finish() called: %d ConnectionsR�(R�R(R�R�(RY((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytfinish�scCs#|jdkrtj|�ndS(Ni(R�R,R�(RYR�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s(RcRdRZR�RFR�R,RJR�tmethodR�R�RRRRRRR�R"R�R*R�(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��s 	
-
---	-9--'cCst|j|j�S(N(tcmpR�(taR((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR��stSetroubleshootdDBuscBseZd�Zd�ZRS(cCsjy3tdtttf�tt|||�|_Wn0tk
re}tjtjd|�|�nXdS(Ns=creating system dbus: bus_name=%s object_path=%s interface=%ss$cannot start system DBus service: %s(	R(tdbus_system_bus_nameRIRJR�tdbus_objt	ExceptionR4R5(RYR�R�R�R�((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyRZ�scCs|jjd�tS(Nsdaemon request(R0R�R�(RY((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt
do_restart�s(RcRdRZR2(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR.�s	cCs|j�tj�dS(N(tsavet	audit2whyR*(Rg((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pytgoodbye�s
i
cCs&tj|�tjtjt�}xZtr~ytj�tjd�PWq%tk
rz}dt|�krqq%n|�q%Xq%Wtjtj|�tjtj	t
�tjtjt
�tjtjt
�tjtjt
�y�t
dd�}tj|�tt�}t
dd�}t|�}t|dd�t||d	td
��atj|�tjtt�t}x�tjjD]�}tjt|jj �t|jj!�t|jj"�|jj#�\}	}
|	tj$ks�|	tj%kr|	tj$krd}nd}tjtj&d
|j'|f�t}tj(|j�qqW|r_tj)dt�nt
ddt*�s�t+t�}nt,t�}ddl-}
|
j-d�a.t/t.�}|j0t�|j1�ddl2m3}|�a4tt5dd�yt4j6t5�Wn8t7k
r>}|j8t9kr5t:|j;�q?|�nXt<d�}x'|D]}t=|t>�}|j?�qRWt@jAjB�tCt.||�}tDjE�}|jF�WnttGk
r�}t:d�nXtHk
r�}t:d�n<tIk
r!}tjtj&d|jJjKt|�f�nXdS(Nis%unable to open /sys/fs/selinux/policyRtpkg_nameRgtfilenamei�R�t
friendly_namesAudit Listenertallowedsdontaudit'ds-Deleting alert %s, it is %s in current policytprunettesttanalyzei����(tSEEmailRecipientSettlisten_for_clients#KeyboardInterrupt in RunFaultServers$raising SystemExit in RunFaultServersexception %s: %s(LR,R�tSIGALRMR6R�R4tinitR�R:R-R3tSIGQUITtSIGTERMRR4topenlogR�RPR$R%RRyR?t
set_notifytatexittregisterR5R!R�R�R<RttscontextttcontextttclassR�tALLOWt	DONTAUDITR5RMR�R3R~ReRtQueueR�Rt	setDaemonR�R R=RoR�tparse_recipient_fileRterrnoRR(tstrerrorRRR�R�RFtglibtinit_threadsR.tgobjecttMainLooptruntKeyboardInterruptt
SystemExitR1R�Rc(R�tsigalrm_handlerR�R6tclient_notifiertdatabase_filenametdatabase_filepathtdeletedtitwhytboolsR�R�RLtanalyze_threadR=tlisten_addressestlisten_addresstlistening_servertsetroubleshootd_dbust	main_loop((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyR�s�
	



H	 


	




t__main__(i((ct__all__RStthreads_initRFtdbus.servicet	dbus.glibtgettextR8R,RER/R4tsystemd.journalRR*RRRRtkwargstversion_infoR�tinstallttranslationtugettextRytAttributeErrortsetroubleshoot.access_controlRtsetroubleshoot.analyzeRRRRtsetroubleshoot.avc_auditRtsetroubleshoot.errcodeRRRRRRRtsetroubleshoot.rpcRRRRtsetroubleshoot.rpc_interfacesR R!R"tsetroubleshoot.utilR#R$R%R&R'R(R3R6R>RR/RIRJR�RNtrequest_nameRR\R?R�RoR�RVRWtinstance_idtobjectRRPReRR�R�tsetroubleshoot.audit_dataR�R�R�R�R�R.R�tselinux.audit2whyR4R5RRc(((s;/usr/lib64/python2.7/site-packages/setroubleshoot/server.pyt<module>s�	

	


"
4	".
	
			
			)�
�		�