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

# This abstraction is only required when .bashrc is loaded (e.g. interactive shell).
# Classic shell scripts do not need it.

  abi <abi/4.0>,

  /usr/share/bash-completion/{,**} r,
  /usr/share/terminfo/{,**} r,

  @{etc_ro}/profile.d/ r,
  @{etc_ro}/profile.d/* r,
  @{etc_ro}/profile.dos r,
  @{etc_ro}/profile r,
  @{etc_ro}/profile.d/ r,
  @{etc_ro}/profile.d/* r,
  /etc/bashrc r,
  /etc/bash.bashrc r,
  /etc/bash.bashrc.local r,
  /etc/bash_completion r,
  /etc/bash_completion.d/{,**} r,
  /etc/inputrc r,
  /etc/mtab r,

  owner @{HOME}/.alias r,
  owner @{HOME}/.bash_aliases r,
  owner @{HOME}/.bash_complete r,
  owner @{HOME}/.bash_history rw,
  owner @{HOME}/.bash_profile r,
  owner @{HOME}/.bashrc r,
  owner @{HOME}/.i18n r,
  owner @{HOME}/.profile r,

  owner @{PROC}/@{pid}/mounts r,

  include if exists <abstractions/bash-strict.d>

# vim:syntax=apparmor
