test(check): ensurre we only match the sbin name.
This commit is contained in:
parent
1c499183f2
commit
4f4a8fa8e7
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ _ensure_vim() {
|
||||||
check_sbin() {
|
check_sbin() {
|
||||||
echo -e "\033[1m ⋅ \033[0mEnsuring '@{sbin}' is used in all profiles:"
|
echo -e "\033[1m ⋅ \033[0mEnsuring '@{sbin}' is used in all profiles:"
|
||||||
while IFS= read -r name; do
|
while IFS= read -r name; do
|
||||||
mapfile -t files < <(grep -l -R "@{bin}/$name" apparmor.d)
|
mapfile -t files < <(grep --files-with-matches --recursive -E "(^|[[:space:]])@{bin}/$name([[:space:]]|$)" apparmor.d)
|
||||||
for file in "${files[@]}"; do
|
for file in "${files[@]}"; do
|
||||||
_die "$file contains '@{bin}/$name' instead of '@{sbin}/$name'"
|
_die "$file contains '@{bin}/$name' instead of '@{sbin}/$name'"
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue