Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-41194

ipa-client rpm post script creates always ssh_config.orig even if nothing needs to be changed

    • ipa-4.12.0-5.el9
    • None
    • Moderate
    • 3
    • rhel-sst-idm-ipa
    • ssg_idm
    • 20
    • 22
    • 3
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • No
    • 2024-Q3-Bravo-S1, 2024-Q3-Bravo-S2, 2024-Q3-Bravo-S3
    • Unspecified Release Note Type - Unknown
    • None

      What were you trying to do that didn't work?

      The ipa-client rpm %post script has a cleanup command to remove 'HostKeyAlgorithms ssh-rsa,ssh-dss'.

      The sed command doing this is always called, even if there is no HostKeyAlgorithms line in the /etc/ssh/ssh_config and because of the sed backup file option it also creates an unneeded ssh_config.orig file.

      ~~~~

      $ diff -u /etc/ssh/ssh_config.orig /etc/ssh/ssh_config

      ~~~~

      Please provide the package NVR for which bug is seen:

      $ rpm -q ipa-client
      ipa-client-4.11.0-10.el9_4.x86_64

      Expected results:

      Can the rpm %post please be updated to check also if the Sed command needs to be used? One additional grep the if-clause would prevent the sed command from running when nothing is going to be replaced

      E.g. the following line can be used:

      if [ -f "$SSH_CLIENT_SYSTEM_CONF" ] && grep -Eq '^(HostKeyAlgorithms ssh-rsa,ssh-dss)$'; then

              frenaud@redhat.com Florence Renaud
              rhn-support-sjawale Shradha Jawale
              Florence Renaud Florence Renaud
              Michal Polovka Michal Polovka
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: