Skip to content

Commit

Permalink
Merge pull request #12882 from Mab879/update_sssd_enable_smartcards_r…
Browse files Browse the repository at this point in the history
…hel10

Update `sssd_enable_smartcards` for RHEL 10
  • Loading branch information
jan-cerny authored Jan 24, 2025
2 parents fec1590 + e4b2e35 commit 943f42c
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
replace: 'pam_cert_auth = True'
with_items: "{{ sssd_conf_d_files.files }}"

{{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9"] %}}
{{% if product in ["fedora", "ol8", "ol9"] or 'rhel' in product %}}
- name: '{{{ rule_title }}} - Check if system relies on authselect'
ansible.builtin.stat:
path: /usr/bin/authselect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ umask u=rw,go=

umask $OLD_UMASK

{{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9"] %}}
{{% if product in ["fedora", "ol8", "ol9"] or 'rhel' in product %}}
if [ -f /usr/bin/authselect ]; then
{{{ bash_enable_authselect_feature('with-smartcard') | indent(4) }}}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<criteria operator="AND">
<criterion comment="Check pam_cert_auth in /etc/sssd/sssd.conf"
test_ref="test_sssd_enable_smartcards"/>
{{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9"] %}}
{{% if product in ["fedora", "ol8", "ol9"] or 'rhel' in product %}}
<criterion comment="Check allow_missing_name in /etc/pam.d/smartcard-auth"
test_ref="test_sssd_enable_smartcards_allow_missing_name_smartcard_auth"/>
<criterion comment="Check try_cert_auth or require_cert_auth in /etc/pam.d/system-auth"
Expand All @@ -30,7 +30,7 @@
<ind:subexpression operation="pattern match">(?i)true</ind:subexpression>
</ind:textfilecontent54_state>

{{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9"] %}}
{{% if product in ["fedora", "ol8", "ol9"] or 'rhel' in product %}}
<ind:textfilecontent54_test check="all" check_existence="all_exist"
comment="tests the presence of try_cert_auth or require_cert_auth in /etc/pam.d/smartcard-auth"
id="test_sssd_enable_smartcards_allow_missing_name_smartcard_auth" version="2">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel
# remediation = none

SSSD_FILE="/etc/sssd/sssd.conf"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

SSSD_FILE="/etc/sssd/sssd.conf"
echo "[pam]" > $SSSD_FILE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

SSSD_FILE="/etc/sssd/sssd.conf"
echo "[pam]" > $SSSD_FILE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

SSSD_FILE="/etc/sssd/conf.d/unused.conf"
echo "[pam]" > $SSSD_FILE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

SSSD_FILE="/etc/sssd/sssd.conf"
echo "[pam]" > $SSSD_FILE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

SSSD_FILE="/etc/sssd/sssd.conf"
echo "[pam]" > $SSSD_FILE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

SSSD_FILE="/etc/sssd/conf.d/unused.conf"
echo "[pam]" > $SSSD_FILE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

SSSD_FILE="/etc/sssd/sssd.conf"
echo "[pam]" > $SSSD_FILE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# packages = authselect,sssd
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,Red Hat Enterprise Linux 8,Red Hat Enterprise Linux 9
# platform = multi_platform_fedora,Oracle Linux 8,Oracle Linux 9,multi_platform_rhel

SSSD_FILE="/etc/sssd/sssd.conf"
rm -f $SSSD_FILE
Expand Down

0 comments on commit 943f42c

Please sign in to comment.