Blame SOURCES/scap-security-guide-0.1.58-ensure_test_helper_scripts_executable-PR_7302.patch

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