diff options
author | John Johansen <john.johansen@canonical.com> | 2013-02-18 19:01:34 -0500 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2013-04-28 03:35:29 -0400 |
commit | 50c5ecd5d8ffb0e549676b8fd9781e3b2fd751a0 (patch) | |
tree | 0d5101b4d3021569f4f50832180b417537c550b1 /security | |
parent | 04266236b1c3030bb7f75472ac85a8b78fcfb284 (diff) |
apparmor: refactor profile mode macros
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/include/policy.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h index bda4569fdd83..95979c431e26 100644 --- a/security/apparmor/include/policy.h +++ b/security/apparmor/include/policy.h | |||
@@ -32,13 +32,13 @@ | |||
32 | extern const char *const profile_mode_names[]; | 32 | extern const char *const profile_mode_names[]; |
33 | #define APPARMOR_NAMES_MAX_INDEX 3 | 33 | #define APPARMOR_NAMES_MAX_INDEX 3 |
34 | 34 | ||
35 | #define COMPLAIN_MODE(_profile) \ | 35 | #define PROFILE_MODE(_profile, _mode) \ |
36 | ((aa_g_profile_mode == APPARMOR_COMPLAIN) || \ | 36 | ((aa_g_profile_mode == (_mode)) || \ |
37 | ((_profile)->mode == APPARMOR_COMPLAIN)) | 37 | ((_profile)->mode == (_mode))) |
38 | 38 | ||
39 | #define KILL_MODE(_profile) \ | 39 | #define COMPLAIN_MODE(_profile) PROFILE_MODE((_profile), APPARMOR_COMPLAIN) |
40 | ((aa_g_profile_mode == APPARMOR_KILL) || \ | 40 | |
41 | ((_profile)->mode == APPARMOR_KILL)) | 41 | #define KILL_MODE(_profile) PROFILE_MODE((_profile), APPARMOR_KILL) |
42 | 42 | ||
43 | #define PROFILE_IS_HAT(_profile) ((_profile)->flags & PFLAG_HAT) | 43 | #define PROFILE_IS_HAT(_profile) ((_profile)->flags & PFLAG_HAT) |
44 | 44 | ||