Skip to content

Commit 17857e4

Browse files
committed
update rule for RHEL-09-611195
If remediating into dropin file, the execstart= (resetting the previous execstart definition) must precede the new definition.
1 parent c8733ac commit 17857e4

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

  • linux_os/guide/system/accounts/accounts-physical/require_emergency_target_auth

linux_os/guide/system/accounts/accounts-physical/require_emergency_target_auth/ansible/shared.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
dest: /etc/systemd/system/emergency.service.d/10-oscap.conf
1212
block: |
1313
[Service]
14+
ExecStart=
1415
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
1516
{{% else %}}
1617
- name: Require emergency mode password

linux_os/guide/system/accounts/accounts-physical/require_emergency_target_auth/bash/shared.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ sulogin='/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default
1616
{{% if 'sle' in product or 'rhel' in product or product == 'fedora' or product == 'slmicro5' or 'ol' in families %}}
1717
mkdir -p "${service_dropin_cfg_dir}"
1818
echo "[Service]" >> "${service_dropin_file}"
19+
echo "ExecStart=" >> "${service_dropin_file}"
1920
echo "ExecStart=-$sulogin" >> "${service_dropin_file}"
2021
{{% else %}}
2122
if grep "^ExecStart=.*" "$service_file" ; then

0 commit comments

Comments
 (0)