# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 2020-2021 Mikhail Morfikov # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License published by the Free Software Foundation. # # ------------------------------------------------------------------ abi , include @{SYNC_DIR} = @{HOME}/Sync/ @{SYNC_DIR} += /media/*/syncthing/ @{exec_path} = /{usr/,}bin/syncthing profile syncthing @{exec_path} { include include include include network inet dgram, network inet6 dgram, network inet stream, network inet6 stream, network netlink raw, @{exec_path} mrix, /{usr/,}bin/xdg-open rCx -> open, /{usr/,}bin/ip rix, owner @{HOME}/ r, owner @{HOME}/.config/syncthing/ rw, owner @{HOME}/.config/syncthing/** rwk, @{SYNC_DIR}/{,**} rw, /etc/mime.types r, @{PROC}/sys/net/core/somaxconn r, @{sys}/kernel/mm/transparent_hugepage/hpage_pmd_size r, # Silecne the noise deny /etc/ssl/certs/java/ r, profile open { include include /{usr/,}bin/xdg-open mr, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/gawk rix, /{usr/,}bin/readlink rix, /{usr/,}bin/basename rix, owner @{HOME}/ r, owner @{run}/user/[0-9]*/ r, # Allowed apps to open /{usr/,}lib/firefox/firefox rPUx, # file_inherit owner @{HOME}/.xsession-errors w, } include if exists }