From 1142b28ba578572c5327d2c3bf3a75e0cffb8613 Mon Sep 17 00:00:00 2001 From: Thomas H Jones II Date: Tue, 4 Jun 2024 16:02:25 -0400 Subject: [PATCH] Fix regex and replacement --- .../RuleById/medium/content_rule_grub2_uefi_admin_username.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ash-linux/el9/RuleById/medium/content_rule_grub2_uefi_admin_username.sls b/ash-linux/el9/RuleById/medium/content_rule_grub2_uefi_admin_username.sls index 8f66d00a5..fe6e4c70e 100644 --- a/ash-linux/el9/RuleById/medium/content_rule_grub2_uefi_admin_username.sls +++ b/ash-linux/el9/RuleById/medium/content_rule_grub2_uefi_admin_username.sls @@ -141,7 +141,7 @@ notify_{{ stig_id }}-skipSet: Set GRUB2 super-user to {{ grubUser }} in {{ grubUserFile }}: file.replace: - name: '{{ grubUserFile }}' - - pattern: '^(|\s*)(set superusers=)\".*\"' + - pattern: '^(|\s*)(set superusers)=".*"' - repl: '\1\2="{{ grubUser }}"' Update {{ grubCfg }} as needed: