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
$ rpm -q ipa-client ipa-client-4.11.0-10.el9_4.x86_64
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
Created as a clone of https://issues.redhat.com/browse/RHEL-41194
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-41194
Metadata Update from @frenaud: - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/7397
master:
ipa-4-12:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-41194, https://issues.redhat.com/browse/RHEL-46606 (was: https://issues.redhat.com/browse/RHEL-41194)
Log in to comment on this ticket.