Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow authorise-without-apparmor when aa_getpeercon() returns ENOPROTOOPT #175

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/frame_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ int main(int argc, char const* argv[])
ConfigurationOption{[&](auto& option) { background_client.set_crash_background_colour(option);},
"diagnostic-background", "Colour of diagnostic screen background RGB", "0x380c24"},
ConfigurationOption{[&](auto& option) { background_client.set_crash_text_colour(option);},

AlanGriffiths marked this conversation as resolved.
Show resolved Hide resolved
"diagnostic-text", "Colour of diagnostic screen text RGB", "0xffffff"},
ConfigurationOption{[&] (auto& option) { background_client.set_diagnostic_path(option);},
"diagnostic-path", "Path (including filename) of diagnostic file", ""},
Expand Down
4 changes: 3 additions & 1 deletion src/snap_name_of.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
AlanGriffiths marked this conversation as resolved.
Show resolved Hide resolved
{
mir::log_info("Fall back (without AppArmor): Identify client via /proc/%%d/cmdline");

Expand Down
Loading