| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.6/site-packages/setroubleshoot/ |
Upload File : |
Ńň
ŽĺJc @ sD d d k Td d k Td d k Td d k Z d e f d YZ d S( i˙˙˙˙( t *Nt Pluginc B st e Z d Z d Z d Z d Z d Z d Z d e e d d Z
d Z d Z d Z
d Z d
Z RS( s
Each plugin object recognizes one or more access denials and
presents a description of the denial to the user. Optionally,
the plugin can provide a suggestion for allowing the access
to the user.
There are four user visible strings that are part of each Plugin
subclass (some or all of these can be changed by the plugin author):
* summary: summary of the denial
* problem_description: detailed description of the denial
* fix_description: description of how to allow the denied access
* fix_cmd: command that can be used to allow the access
All of the strings will have a standard set of substitutions performed.
Each keyword (proceeded by a '$' will be replace by a string) - see
http://docs.python.org/lib/node109.html for more information. The
keywords are:
* $SOURCE_TYPE - type for the source of the avc (usually the
process performing the operation).
* $TARGET_TYPE - type for the target of the avc (the type of
the object).
* $SOURCE_PATH - source of the executable (from the exe or comm
field of the exe). A full path is not always available.
* $TARGET_PATH - path for the target object. A full path is not
always available.
* $TARGET_DIR - path of the containing directory for TARGET_PATH.
Essentially os.path.dirname($TARGET_PATH)
* $TARGET_CLASS - the object class for the target.
* $PERMS - the permissions denied.
* $SOURCE_PACKAGE - name of the package which contains the
executable (from $SOURCE_PATH).
* $PORT_NUMBER - the port number for the connection denied.
Additional subtitutions can be added with set_template_substitutions.
You can also optional pass the name for a single boolean which will be
used to set the $BOOLEAN subtitution into Plugin.__init__.
You can also set the level, of the alert, if the plugin believes discovers
a signature of an attack, the level should be set to red
* level: Defines the level of the alert, two supported (red, yellow(default)
t c C s% t i d d | | _ d | _ d S( Ns
^plugins\.R i2 ( t ret subt analysis_idt priority( t selft name( ( s9 /usr/lib/python2.6/site-packages/setroubleshoot/Plugin.pyt __init__M s t yellows Fix itc
. C sÜ | i | i }
| i xD | i i D]3 \ } } t | t p t i d | | q, q, Wd d k l
}
|
| i | i } |
| i | i } |
| i | i } |
| i | i } t | | | | } | i
i d j o | i
i i n t d | i d | i
d | i d | i d | i d | i d
| i d | i d | i d
| i d | i d | i d | i | |
d | d | d |
d | i
i d t | i
i d | d | d | } | S( sC
Report a denial and solution to the fault server.
s. template substitution (%s) is not a string, %si˙˙˙˙( t TemplateR t audit_eventt sourcet spatht tpatht src_rpm_listt tgt_rpm_listt scontextt tcontextt tclasst portt hostt sigt solutiont categoryt environmentt line_numberst last_seen_datet levelt fixablet button_textN( t get_environmentt query_environmentt validate_template_substitutionst template_substitutionst itemst
isinstancet strt
log_plugint warnt stringR t safe_substitutet SEFaultSolutionR R t Nonet sortt SEFaultSignatureInfoR R
R R t src_rpmst tgt_rpmsR R R R R t
get_signaturet TimeStampt timestamp( R t avcR t summary_templatet problem_description_templatet fix_description_templatet fix_cmd_templateR R R R t kt vR t summaryt problem_descriptiont fix_descriptiont fix_cmdR t siginfo( ( s9 /usr/lib/python2.6/site-packages/setroubleshoot/Plugin.pyt reportQ sR
c C s"