# apparmor.d - Full set of apparmor profiles # Copyright (C) 2015-2020 Mikhail Morfikov # SPDX-License-Identifier: GPL-2.0-only abi , include @{exec_path} = /{usr/,}bin/gajim profile gajim @{exec_path} { include include include include include include include include include include include include include include include network inet dgram, network inet6 dgram, network inet stream, network inet6 stream, network netlink raw, @{exec_path} r, /{usr/,}bin/ r, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/uname rix, /{usr/,}sbin/ldconfig rix, # To play sounds /{usr/,}bin/aplay rCx -> audio, /{usr/,}bin/pacat rCx -> audio, # Needed for GPG/PGP support /{usr/,}bin/gpg rCx -> gpg, # External apps /{usr/,}bin/xdg-settings rPUx, /{usr/,}lib/firefox/firefox rPUx, # Gajim plugins /usr/share/gajim/plugins/{,**} r, # Gajim home files owner @{HOME}/ r, owner @{HOME}/.config/gajim/{,**} rw, owner @{HOME}/.local/share/gajim/ rw, owner @{HOME}/.local/share/gajim/** rwk, # Cache owner @{HOME}/.cache/ rw, owner @{HOME}/.cache/gajim/ rw, owner @{HOME}/.cache/gajim/** rwk, owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/mounts r, owner @{PROC}/@{pid}/mountinfo r, /etc/fstab r, /usr/share/glib-2.0/schemas/gschemas.compiled r, # TMP files locations (first in /tmp/ , /var/tmp/ and @{HOME}/) owner /tmp/* rw, # owner /var/tmp/* rw, # owner @{HOME}/* rw, # Silencer deny /usr/share/gajim/** w, profile audio { include include /{usr/,}bin/aplay mr, /{usr/,}bin/pacat mr, owner @{HOME}/.Xauthority r, /etc/machine-id r, /var/lib/dbus/machine-id r, } profile gpg { include /{usr/,}bin/gpg mr, owner @{HOME}/.gnupg/ rw, owner @{HOME}/.gnupg/** rwkl -> @{HOME}/.gnupg/**, } include if exists }