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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = /usr/share/language-tools/language-{options,validate}
@{att} = /att/language-validate/
profile language-validate /usr/share/language-tools/language-{options,validate}  flags=(attach_disconnected,attach_disconnected.path=@{att},complain) {
  include <abstractions/attached/base>

  capability setgid,

  @{exec_path} mrix,

  @{sh_path}         rix,
  @{bin}/{,e}grep    rix,
  @{bin}/locale      rix,

  /usr/share/language-tools/{,*} r,

  include if exists <local/language-validate>
}

# vim:syntax=apparmor
