• John Johansen's avatar
    apparmor: modify audit rule support to support profile stacks · 2ab47dae
    John Johansen authored
    Allows for audit rules, where a rule could specify a profile stack
    A//&B, while extending the current semantic so if the label specified
    in the audit rule is a subset of the secid it is considered a match.
    
    Eg. if the secid resolves to the label stack A//&B//&C
    
    Then an audit rule specifying a label of
    
      A - would match
      B - would match
      C - would match
      D - would not
      A//&B - would match as a subset
      A//&C - would match as a subset
      B//&C - would match as a subset
      A//&B//&C - would match
    
      A//&D - would not match, because while A does match, D is also
      specified and does not
    
    Note: audit rules are currently assumed to be coming from the root
    namespace.
    Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
    2ab47dae
audit.c 5.48 KB