# vim:syntax=apparmor # ------------------------------------------------------------------ # # Copyright (C) 2019-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 @{exec_path} = /{usr/,}bin/dlocate profile dlocate @{exec_path} { include include include @{exec_path} rix, /{usr/,}bin/{,ba,da}sh rix, /{usr/,}bin/getopt rix, /{usr/,}bin/{,e}grep rix, /{usr/,}bin/awk rix, /{usr/,}bin/cat rix, /{usr/,}bin/sort rix, /{usr/,}bin/sed rix, /{usr/,}bin/stty rix, /{usr/,}bin/grep-dctrl rix, /{usr/,}bin/gawk rix, /{usr/,}bin/cut rix, /{usr/,}bin/xargs rix, /{usr/,}bin/ls rix, /{usr/,}bin/du rix, /{usr/,}bin/stat rix, /{usr/,}bin/md5sum rCx -> md5sum, /etc/default/dlocate r, /var/lib/dlocate/dlocatedb r, /var/lib/dlocate/dpkg-list r, /var/lib/dpkg/status r, /var/lib/dpkg/info/*.list r, /var/lib/dpkg/info/*.conffiles r, /var/lib/dpkg/info/*.md5sums r, owner /tmp/sh-thd.* rw, owner @{PROC}/@{pid}/fd/ r, owner @{PROC}/@{pid}/fd/2 w, / r, profile md5sum { include /{usr/,}bin/md5sum mr, # For the md5 check /boot/** r, /usr/** r, } include if exists }