mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 07:11:51 +00:00
apparmor: recognize 'unconfined' as unconfined.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
babccc20e8
commit
919a04ed23
@ -150,8 +150,10 @@ static bool aa_stacking_supported(void) {
|
||||
static bool in_aa_confined_container(void) {
|
||||
char *p = apparmor_process_label_get(getpid());
|
||||
bool ret = false;
|
||||
if (p && strcmp(p, "/usr/bin/lxc-start") != 0)
|
||||
if (p && strcmp(p, "/usr/bin/lxc-start") != 0 && strcmp(p, "unconfined") != 0) {
|
||||
INFO("Already apparmor-confined under %s", p);
|
||||
ret = true;
|
||||
}
|
||||
free(p);
|
||||
return ret;
|
||||
}
|
||||
@ -191,7 +193,6 @@ static int apparmor_process_label_set(const char *inlabel, struct lxc_conf *conf
|
||||
ERROR("already apparmor confined, but new label requested.");
|
||||
return -1;
|
||||
}
|
||||
INFO("Already apparmor-confined");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user