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

def audit_rules::Field::option_text (   self,
  rule 
)

Return a string representing this field as an auditctl option.

Use rule to determine the correct syntax.

Definition at line 350 of file audit_rules.py.

00350                                :
        '''Return a string representing this field as an auditctl option.

        Use rule to determine the correct syntax.

        '''
        val = self._value_text()
        if self.var == audit.AUDIT_FILTERKEY:
            assert self.op == self.OP_EQ
            return '-k %s' % val
        elif (self.var == audit.AUDIT_PERM and
              len([f for f in rule.fields if f.var == audit.AUDIT_WATCH]) == 1):
            assert self.op == self.OP_EQ
            return '-p %s' % val
        else:
            return '-F %s%s%s' % (audit.audit_field_to_name(self.var), self.op,
                                  val)

    def user_text(self):


Generated by  Doxygen 1.6.0   Back to index