In which case lxc will not update the apparmor profile at all.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
#define AA_DEF_PROFILE "lxc-container-default"
#define AA_MOUNT_RESTR "/sys/kernel/security/apparmor/features/mount/mask"
#define AA_ENABLED_FILE "/sys/module/apparmor/parameters/enabled"
+#define AA_UNCHANGED "unchanged"
static bool check_mount_feature_enabled(void)
{
if (!aa_enabled)
return 0;
+ /* user may request that we just ignore apparmor */
+ if (label && strcmp(label, AA_UNCHANGED) == 0) {
+ INFO("apparmor profile unchanged per user request");
+ return 0;
+ }
+
if (!label) {
if (use_default)
label = AA_DEF_PROFILE;