apparmor.d/apparmor.d/profiles-a-f/dlocate
2021-09-15 16:55:27 +01:00

65 lines
1.3 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019-2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/dlocate
profile dlocate @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/nameservice-strict>
@{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 <abstractions/base>
/{usr/,}bin/md5sum mr,
# For the md5 check
/boot/** r,
/usr/** r,
}
include if exists <local/dlocate>
}