# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/session-migration
profile session-migration @{exec_path} {
  include <abstractions/base>

  @{exec_path} mr,

  @{sh_path}  rix,
  @{bin}/gsettings rPx,
  /usr/share/session-migration/scripts/*.sh rix,

  /usr/share/session-migration/{,**} r,

  owner @{gdm_share_dirs}/session_migration-* rw,
  owner @{user_share_dirs}/session_migration-* rw,

  /dev/tty@{int} rw,

  include if exists <local/session-migration>
}

# vim:syntax=apparmor
