apparmor: refcount the pdb
authorJohn Johansen <john.johansen@canonical.com>
Fri, 28 Apr 2023 12:32:52 +0000 (05:32 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Wed, 18 Oct 2023 22:30:47 +0000 (15:30 -0700)
commit98b824ff8984fd523fc264fbb13208098ab09da3
tree35f60b9788d10a556442d1ad5c5bfe4c4a26252d
parent75c77e9e0713fddbe99a21a036aa6482402f9e34
apparmor: refcount the pdb

With the move to permission tables the dfa is no longer a stand
alone entity when used, needing a minimum of a permission table.
However it still could be shared among different pdbs each using
a different permission table.

Instead of duping the permission table when sharing a pdb, add a
refcount to the pdb so it can be easily shared.

Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
15 files changed:
security/apparmor/apparmorfs.c
security/apparmor/domain.c
security/apparmor/file.c
security/apparmor/include/lib.h
security/apparmor/include/match.h
security/apparmor/include/policy.h
security/apparmor/ipc.c
security/apparmor/label.c
security/apparmor/lib.c
security/apparmor/lsm.c
security/apparmor/match.c
security/apparmor/mount.c
security/apparmor/net.c
security/apparmor/policy.c
security/apparmor/policy_unpack.c