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

def watch_dialog::WatchDialog::_save_rule (   self,
  rule 
) [private]

Modify rule to reflect dialog state.

Definition at line 92 of file watch_dialog.py.

00092                               :
        '''Modify rule to reflect dialog state.'''
        assert rule.action == rule.ACTION_ALWAYS
        del rule.fields[:]
        if self.watch_key_present.get_active():
            f = Field()
            f.var = audit.AUDIT_FILTERKEY
            f.op = Field.OP_EQ
            f.value = self.watch_key.get_text()
            rule.fields.append(f)
        f = Field()
        f.var = audit.AUDIT_WATCH
        f.op = Field.OP_EQ
        f.value = self.watch_path.get_text()
        rule.fields.append(f)
        perm = 0
        for (w, mask) in ((self.watch_read, audit.AUDIT_PERM_READ),
                          (self.watch_write, audit.AUDIT_PERM_WRITE),
                          (self.watch_exec, audit.AUDIT_PERM_EXEC),
                          (self.watch_attr, audit.AUDIT_PERM_ATTR)):
            if w.get_active():
                perm |= mask
        if mask != (audit.AUDIT_PERM_READ | audit.AUDIT_PERM_WRITE |
                    audit.AUDIT_PERM_EXEC | audit.AUDIT_PERM_ATTR):
            f = Field()
            f.var = audit.AUDIT_PERM
            f.op = Field.OP_EQ
            f.value = perm
            rule.fields.append(f)

    def _validate_get_failure(self):


Generated by  Doxygen 1.6.0   Back to index