Skip to main content

doas_conf_has_persist_rule

Function doas_conf_has_persist_rule 

Source
pub fn doas_conf_has_persist_rule(contents: &str) -> bool
Expand description

What: Check whether a parsed doas.conf body has at least one active permit persist rule.

Inputs:

  • contents: Raw text contents from doas.conf.

Output:

  • true if a non-comment rule line includes both permit and persist.

Details:

  • Ignores blank lines and comments (# ...).
  • Uses token matching to avoid false positives from unrelated substrings.