apparmor: add user mode flag
Allow the profile to contain a user mode prompt flag. This works similar to complain mode but will try to send messages to a userspace daemon. If the daemon is not present or timesout regular informent will occur. Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -44,6 +44,8 @@ extern const char *const aa_profile_mode_names[];
|
||||
|
||||
#define COMPLAIN_MODE(_profile) PROFILE_MODE((_profile), APPARMOR_COMPLAIN)
|
||||
|
||||
#define USER_MODE(_profile) PROFILE_MODE((_profile), APPARMOR_USER)
|
||||
|
||||
#define KILL_MODE(_profile) PROFILE_MODE((_profile), APPARMOR_KILL)
|
||||
|
||||
#define PROFILE_IS_HAT(_profile) ((_profile)->label.flags & FLAG_HAT)
|
||||
@@ -67,6 +69,7 @@ enum profile_mode {
|
||||
APPARMOR_COMPLAIN, /* allow and log access violations */
|
||||
APPARMOR_KILL, /* kill task on access violation */
|
||||
APPARMOR_UNCONFINED, /* profile set to unconfined */
|
||||
APPARMOR_USER, /* modified complain mode to userspace */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ struct aa_load_ent *aa_load_ent_alloc(void);
|
||||
#define PACKED_MODE_COMPLAIN 1
|
||||
#define PACKED_MODE_KILL 2
|
||||
#define PACKED_MODE_UNCONFINED 3
|
||||
#define PACKED_MODE_USER 4
|
||||
|
||||
struct aa_ns;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user