]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: convert attaching profiles via xattrs to use dfa matching
authorJohn Johansen <john.johansen@canonical.com>
Tue, 12 Dec 2017 23:28:05 +0000 (15:28 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Fri, 9 Feb 2018 19:30:02 +0000 (11:30 -0800)
commit45952b830255781b8221ef0690a56e800d7139df
treee50e4e5198006f8c6d43a369a45f08dfd3b7a4ba
parentada1a8786adeb0a0e3d39bcb8ae3e29cf856e283
apparmor: convert attaching profiles via xattrs to use dfa matching

This converts profile attachment based on xattrs to a fixed extended
conditional using dfa matching.

This has a couple of advantages
- pattern matching can be used for the xattr match

- xattrs can be optional for an attachment or marked as required

- the xattr attachment conditional will be able to be combined with
  other extended conditionals when the flexible extended conditional
  work lands.

The xattr fixed extended conditional is appended to the xmatch
conditional. If an xattr attachment is specified the profile xmatch
will be generated regardless of whether there is a pattern match on
the executable name.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
security/apparmor/apparmorfs.c
security/apparmor/domain.c
security/apparmor/include/policy.h
security/apparmor/policy.c
security/apparmor/policy_unpack.c