From 6aba5d3ef8e4d69943f834b3ff1bd3464efb7705 Mon Sep 17 00:00:00 2001 From: Brian Thacker Date: Tue, 18 May 2021 15:10:05 -0500 Subject: [PATCH] Update T1562.001.yaml Test 1: changed commands to be executed via input arguments to account for different flavors of Linux. Added cleanup commands based on the same principle. --- atomics/T1562.001/T1562.001.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/atomics/T1562.001/T1562.001.yaml b/atomics/T1562.001/T1562.001.yaml index f931ff59..b7b0bb5e 100644 --- a/atomics/T1562.001/T1562.001.yaml +++ b/atomics/T1562.001/T1562.001.yaml @@ -7,16 +7,20 @@ atomic_tests: Disables syslog collection supported_platforms: - linux + input_arguments: + flavor_command: + description: Command to disable syslog collection. Default newer rsyslog commands. i.e older command = service rsyslog stop ; chkconfig off rsyslog + type: String + default: systemctl stop rsyslog ; systemctl disable rsyslog + cleanup_command: + description: Command to enable syslog collection. Default newer rsyslog commands. i.e older command = service rsyslog start ; chkconfig rsyslog on + type: String + default: systemctl start rsyslog ; systemctl enable rsyslog executor: command: | - if [ $(rpm -q --queryformat '%{VERSION}' centos-release) -eq "6" ]; - then - service rsyslog stop - chkconfig off rsyslog - else if [ $(rpm -q --queryformat '%{VERSION}' centos-release) -eq "7" ]; - systemctl stop rsyslog - systemctl disable rsyslog - fi + #{flavor_command} + cleanup_command: | + #{cleanup_command} name: sh - name: Disable Cb Response auto_generated_guid: ae8943f7-0f8d-44de-962d-fbc2e2f03eb8