]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
apparmor: make fn_label_build() capable of handling not supported
authorJohn Johansen <john.johansen@canonical.com>
Tue, 24 Feb 2026 16:02:04 +0000 (09:02 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Sun, 14 Jun 2026 03:14:07 +0000 (20:14 -0700)
commit716d384ac7c905b719f3ce11cdb3a3d172c210fb
tree9569e81c9192ce474b2e3e0db0a8340f5085b374
parented7cc1c6f240a0c2838c0617afb2b0466edd236f
apparmor: make fn_label_build() capable of handling not supported

Currently fn_label_build() callback fns must provide a transition or
failure. Change this so that a callback can indicate it should be
skipped/not be involved in the label being built.

This will be useful when building object labels based on mediation
flags, as to whether the label should be set.

Existing callers can keep treating NULL return as an error because
none of those callback fns support skipping, but instead of the old
error handling replace with AA_BUG.

Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/include/lib.h