mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
26 lines
844 B
Diff
26 lines
844 B
Diff
Index: b/security/apparmor/main.c
|
|
===================================================================
|
|
--- a/security/apparmor/main.c
|
|
+++ b/security/apparmor/main.c
|
|
@@ -1108,7 +1108,7 @@ repeat:
|
|
goto out;
|
|
}
|
|
|
|
- if (profile != profile->parent) {
|
|
+ if (profile == profile->parent) {
|
|
/* We are in the parent profile. */
|
|
if (hat_name) {
|
|
AA_DEBUG("%s: switching to %s, 0x%x\n",
|
|
Index: b/security/apparmor/module_interface.c
|
|
===================================================================
|
|
--- a/security/apparmor/module_interface.c
|
|
+++ b/security/apparmor/module_interface.c
|
|
@@ -565,7 +565,7 @@ void free_aa_profile(struct aa_profile *
|
|
free_aa_profile(profile->null_profile);
|
|
list_for_each_entry_safe(p, ptmp, &profile->sub, list) {
|
|
list_del_init(&p->list);
|
|
- p->parent = NULL;
|
|
+ p->parent = p;
|
|
aa_put_profile(p);
|
|
}
|
|
|