UBUNTU: SAUCE: apparmor4.0.0 [66/90]: prompt - add support for advanced filtering of notifications
BugLink: http://bugs.launchpad.net/bugs/2028253 Simple filtering based off of type (ALLOWED, DENIED, ...) is insufficient for several user cases. Allow for a dfa based filter that can be combined with type to further screen notifications to specific labels, classes of mediation and even the permission request. BugLink: http://bugs.launchpad.net/bugs/2032602 Signed-off-by: John Johansen <john.johansen@canonical.com> (cherry picked from https://gitlab.com/jjohansen/apparmor-kernel) Signed-off-by: Andrea Righi <andrea.righi@canonical.com> (cherry picked from commit 60b7d6660330beee97539ed233854a81f30aabd2 https://git.launchpad.net/~apparmor-dev/ubuntu-kernel-next) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
This commit is contained in:
committed by
Paolo Pisati
parent
285748e335
commit
177a32ef2d
@@ -118,6 +118,14 @@ static inline aa_state_t aa_dfa_null_transition(struct aa_dfa *dfa,
|
||||
return aa_dfa_next(dfa, start, 0);
|
||||
}
|
||||
|
||||
static inline aa_state_t aa_dfa_match_u16(struct aa_dfa *dfa, aa_state_t state,
|
||||
u16 data)
|
||||
{
|
||||
__be16 buffer = cpu_to_be16(data);
|
||||
|
||||
return aa_dfa_match_len(dfa, state, (char *) &buffer, 2);
|
||||
}
|
||||
|
||||
static inline bool path_mediated_fs(struct dentry *dentry)
|
||||
{
|
||||
return !(dentry->d_sb->s_flags & SB_NOUSER);
|
||||
|
||||
Reference in New Issue
Block a user