From 32a2e18aaece788edac6ac314846d042facb0e55 Mon Sep 17 00:00:00 2001 From: hypnoticpattern <45320229+hypnoticpattern@users.noreply.github.com> Date: Wed, 15 Apr 2020 17:09:42 -0700 Subject: [PATCH] Fix issue with non-executable bashf file (#942) The file has to be marked as executable before it can run. When the repository is cloned there is no executable flag set and running the test would cause the following error: `failed to run command '/home/user/src/atomic-red-team/atomics/T1154/../T1154/src/echo-art-fish.sh': Permission denied`. Using `sh` with the `trap` command fixes the issue and doesn't require to manually set the flag. --- atomics/T1154/T1154.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atomics/T1154/T1154.yaml b/atomics/T1154/T1154.yaml index 29515f6b..d3cb870d 100644 --- a/atomics/T1154/T1154.yaml +++ b/atomics/T1154/T1154.yaml @@ -16,6 +16,6 @@ atomic_tests: executor: name: sh command: | - trap "nohup $PathToAtomicsFolder/T1154/src/echo-art-fish.sh | bash" EXIT + trap "nohup sh $PathToAtomicsFolder/T1154/src/echo-art-fish.sh | bash" EXIT exit - trap "nohup $PathToAtomicsFolder/T1154/src/echo-art-fish.sh | bash" SIGINt + trap "nohup sh $PathToAtomicsFolder/T1154/src/echo-art-fish.sh | bash" SIGINt