apparmor: add a default null dfa
authorJohn Johansen <john.johansen@canonical.com>
Mon, 16 Jan 2017 08:42:42 +0000 (00:42 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Mon, 16 Jan 2017 09:18:34 +0000 (01:18 -0800)
commit11c236b89d7c26d58c55d5613a858600a4d2ab3a
tree591f879c7a4491b17a03391343fc3c0a98bb7165
parent6604d4c1c1a65d3d1a6a56291d96516d1e9b7041
apparmor: add a default null dfa

Instead of testing whether a given dfa exists in every code path, have
a default null dfa that is used when loaded policy doesn't provide a
dfa.

This will let us get rid of special casing and avoid dereference bugs
when special casing is missed.

Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/include/match.h
security/apparmor/lsm.c
security/apparmor/match.c
security/apparmor/nulldfa.in [new file with mode: 0644]
security/apparmor/policy.c
security/apparmor/policy_unpack.c