From 35f23a6da12ea42655f0b11f94766fa7fada03d3 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 15 Feb 2022 07:28:27 +0000 Subject: [PATCH] profile-load: use safer "read" construct In this case it does not matter, we're merely testing if we can actually read from that file, but let's make this robust (and shellcheck happy) for future's sake. Reference: https://www.shellcheck.net/wiki/SC2162 --- parser/profile-load | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/profile-load b/parser/profile-load index 2663c04d5..95b474ee3 100755 --- a/parser/profile-load +++ b/parser/profile-load @@ -42,7 +42,7 @@ aafs=/sys/kernel/security/apparmor params=$module/parameters [ -r $params/enabled ] || exit 0 # do not load if missing -read enabled < $params/enabled || exit 1 # if this fails, something went wrong +read -r enabled < $params/enabled || exit 1 # if this fails, something went wrong [ "$enabled" = "Y" ] || exit 0 # do not load if disabled /sbin/apparmor_parser -r -W "$profile" || exit 0 # LP: #1058356