scap-security-guide/SOURCES/scap-security-guide-0.1.58-ensure_test_helper_scripts_executable-PR_7302.patch
2021-11-02 16:51:38 +00:00

29 lines
916 B
Diff

From 030557e3c4b48f568f6fef7de36de4dca6c66838 Mon Sep 17 00:00:00 2001
From: Watson Sato <wsato@redhat.com>
Date: Thu, 29 Jul 2021 19:02:11 +0200
Subject: [PATCH] Ensure test scenarios and scripts are excutable
After Jinja processing the test scenarios and test helper scripts they
lose their original permissions. This ensures they are readable and
executable.
The helper scripts are called by test scenarios and they need to be
executable.
---
tests/ssg_test_suite/common.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/ssg_test_suite/common.py b/tests/ssg_test_suite/common.py
index 3dbeaf304a..130e5c960c 100644
--- a/tests/ssg_test_suite/common.py
+++ b/tests/ssg_test_suite/common.py
@@ -245,6 +245,8 @@ def _make_file_root_owned(tarinfo):
if tarinfo:
tarinfo.uid = 0
tarinfo.gid = 0
+ # set permission to 775
+ tarinfo.mode = 509
return tarinfo