From b30710dc5476afbd4c64257d2a20a31a5febf76c Mon Sep 17 00:00:00 2001 From: Gianluca Zuccarelli Date: Wed, 27 Mar 2024 10:07:52 +0000 Subject: [PATCH] test/scripts: chown `results.xml` The `results.xml` file is owned by root, chown the file so we can read the results. --- test/scripts/base-host-check.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/scripts/base-host-check.sh b/test/scripts/base-host-check.sh index 4c8fdd5a31..6cf895b55a 100755 --- a/test/scripts/base-host-check.sh +++ b/test/scripts/base-host-check.sh @@ -47,6 +47,7 @@ get_oscap_score() { "${datastream}" || true # oscap returns exit code 2 for any failed rules echo "📄 Saving results" + sudo chown "$UID" results.xml echo "📗 Checking oscap score" hardened_score=$(xmlstarlet sel -N x="http://checklists.nist.gov/xccdf/1.2" -t -v "//x:score" results.xml)