mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
regression tests: fix aa_policy_cache to use correct config file
The aa_policy_cache test is using the system parser.conf file even when the tests are set to use source. This can lead to failures if the system parser.conf contain options not understood by the source parser. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/653 Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -56,7 +56,7 @@ create_cache_files()
|
||||
do
|
||||
cachefile="${cachedir}/${policy}"
|
||||
|
||||
echo "profile $policy { /f r, }" | ${subdomain} -qS > "$cachefile"
|
||||
echo "profile $policy { /f r, }" | ${subdomain} "${parser_config}" -qS > "$cachefile"
|
||||
done
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,8 @@ subdomain=${PWD}/../../../parser/apparmor_parser
|
||||
#subdomain=/sbin/apparmor_parser
|
||||
|
||||
# 2. additional arguments to the apparmor parser
|
||||
parser_args="--config-file=${PWD}/../../../parser.conf -q -K"
|
||||
parser_config="--config-file=${PWD}/../../../parser/parser.conf"
|
||||
parser_args="${parser_config} -q -K"
|
||||
|
||||
# 3. directory to be used for temp files
|
||||
# Need to be able to access this directory by the root and nobody users.
|
||||
|
@@ -3,7 +3,9 @@
|
||||
subdomain=/sbin/apparmor_parser
|
||||
|
||||
# 2. additional arguments to the apparmor parser
|
||||
parser_args="-q -K"
|
||||
parser_config=""
|
||||
parser_args="${parser_config} -q -K"
|
||||
|
||||
|
||||
# 3. directory to be used for temp files
|
||||
# Need to be able to access this directory by the root and nobody users.
|
||||
|
Reference in New Issue
Block a user