Commit 50c5ecd5 authored by John Johansen's avatar John Johansen

apparmor: refactor profile mode macros

Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-by: default avatarSteve Beattie <sbeattie@ubuntu.com>
parent 04266236
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
extern const char *const profile_mode_names[]; extern const char *const profile_mode_names[];
#define APPARMOR_NAMES_MAX_INDEX 3 #define APPARMOR_NAMES_MAX_INDEX 3
#define COMPLAIN_MODE(_profile) \ #define PROFILE_MODE(_profile, _mode) \
((aa_g_profile_mode == APPARMOR_COMPLAIN) || \ ((aa_g_profile_mode == (_mode)) || \
((_profile)->mode == APPARMOR_COMPLAIN)) ((_profile)->mode == (_mode)))
#define KILL_MODE(_profile) \ #define COMPLAIN_MODE(_profile) PROFILE_MODE((_profile), APPARMOR_COMPLAIN)
((aa_g_profile_mode == APPARMOR_KILL) || \
((_profile)->mode == APPARMOR_KILL)) #define KILL_MODE(_profile) PROFILE_MODE((_profile), APPARMOR_KILL)
#define PROFILE_IS_HAT(_profile) ((_profile)->flags & PFLAG_HAT) #define PROFILE_IS_HAT(_profile) ((_profile)->flags & PFLAG_HAT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment