diff --git a/src/snap_name_of.cpp b/src/snap_name_of.cpp index 6815623..13a24ee 100644 --- a/src/snap_name_of.cpp +++ b/src/snap_name_of.cpp @@ -41,7 +41,9 @@ auto snap_name_of(miral::Application const& app, bool fallback_without_apparmor, { mir::log_info("aa_getpeercon() failed for process %d: %s", miral::pid_of(app), strerror(errno)); - if ((errno == EINVAL) && fallback_without_apparmor) // EINVAL is what is returned when AppArmor isn't setup + // EINVAL is what is returned when AppArmor isn't setup + // ENOPROTOOPT is what is returned when AppArmor doesn't have some Ubuntu patches (yet) + if (((errno == EINVAL) || errno == ENOPROTOOPT) && fallback_without_apparmor) { mir::log_info("Fall back (without AppArmor): Identify client via /proc/%%d/cmdline");