Logo Search packages:      
Sourcecode: audit version File versions  Download package

def auditd_config::AuditdConfig::__parse_action (   value,
  value2 
) [private]

Parse an action specification.

Return (action, exe), where exe may be None if it is not necessary.
Raise ParsingError on error.

Definition at line 129 of file auditd_config.py.

00129                                      :
        '''Parse an action specification.

        Return (action, exe), where exe may be None if it is not necessary.
        Raise ParsingError on error.

        '''
        value = value.lower()
        if value == 'exec':
            if value2 is None:
                raise ParsingError('Two values are expected for the "exec" '
                                   'action')
            return (AuditdConfig.FAILURE_EXEC, value2)
        else:
            # auditd ignores value2 if it is present
            try:
                return (AuditdConfig.__failure_action_values[value], None)
            except KeyError:
                raise ParsingError('Invalid value')

    def __interpret_option(self, name, unused_equals, value, value2 = None):


Generated by  Doxygen 1.6.0   Back to index