apparmor: Fix loading of child before parent
authorJohn Johansen <john.johansen@canonical.com>
Mon, 3 Oct 2022 13:06:26 +0000 (06:06 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Tue, 25 Oct 2022 07:15:11 +0000 (00:15 -0700)
commit665b1856dc2399828d8ee07a18d4fd79868e729a
treec1ad142f7f3091177244376b2a5a7eecb80d0a65
parent58f89ce58bb4f5cf5963b20a19aaa2431b0412d8
apparmor: Fix loading of child before parent

Unfortunately it is possible for some userspace's to load children
profiles before the parent profile. This can even happen when the
child and the parent are in different load sets.

Fix this by creating a null place holder profile that grants no permissions
and can be replaced by the parent once it is loaded.

Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy.c