# AgentsRoom - AppArmor profile (Ubuntu 23.10+, #4498)
#
# Ubuntu restricts unprivileged user namespaces through AppArmor
# (kernel.apparmor_restrict_unprivileged_userns=1). Chromium's sandbox needs
# them: without this profile the app aborts at launch (SIGTRAP). The profile
# confines nothing ("unconfined"), it only grants `userns` to the AgentsRoom
# binary, the same way Ubuntu ships one for Chrome, VS Code and others.
#
# Installed by the .deb postinst as /etc/apparmor.d/agentsroom, only when the
# local AppArmor accepts it (abi 4.0). Local overrides: /etc/apparmor.d/local/agentsroom

abi <abi/4.0>,
include <tunables/global>

profile agentsroom /opt/AgentsRoom/agentsroom flags=(unconfined) {
  userns,

  # Site-specific additions and overrides. See local/README for details.
  include if exists <local/agentsroom>
}
