org.usbguard.Policy

Name

org.usbguard.Policy -- 

Methods


listRules  (IN  s     query,
            OUT a(us) ruleset);
appendRule (IN  s     rule,
            IN  u     parent_id,
            OUT u     id);
removeRule (IN  u     id);

Description

The Policy interface allows to modify the USBGuard authorization policy.

Method Details

The listRules() method


listRules (IN  s     query,
           OUT a(us) ruleset);

List the current rule set (policy) used by the USBGuard daemon. The rules are returned in the same order as they are evaluated.

IN s query:

A query, in the rule language syntax, for matching rules.

OUT a(us) ruleset:

An array of (rule_id, rule) tuples.

The appendRule() method


appendRule (IN  s rule,
            IN  u parent_id,
            OUT u id);

Append a new rule to the current policy. Using the parent_id parameter, the rule can be inserted anywhere in the policy, not only at the end. When the rule is successfully appended, the id assigned to the new rule is returned.

IN s rule:

The rule that should be appended to the policy.

IN u parent_id:

Rule id of the parent rule.

OUT u id:

The rule id assigned to the succesfully appended rule.

The removeRule() method


removeRule (IN  u id);

Remove a rule from the current policy.

IN u id:

The rule id of the rule to be removed.