# AppArmor profile for the Aban AI desktop app, installed by the .deb as /etc/apparmor.d/aban-agent-desktop.
# Ubuntu 24.04+ blocks unprivileged user namespaces unless a profile grants them; WebKitGTK's bwrap sandbox
# needs one, so without this the window never opens ("bwrap: setting up uid map: Permission denied").
# Unconfined plus userns, the same pattern Ubuntu ships for its own WebKit apps: it grants user namespaces
# and changes nothing else. Local additions go in /etc/apparmor.d/local/aban-agent-desktop.
abi <abi/4.0>,
include <tunables/global>

profile aban-agent-desktop /usr/bin/aban-agent-desktop flags=(unconfined) {
  userns,

  include if exists <local/aban-agent-desktop>
}
