#9610 ipa-client rpm post script creates always ssh_config.orig even if nothing needs to be changed
Closed: fixed 7 months ago by frenaud. Opened 7 months ago by frenaud.

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

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

7 months ago

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/7397

7 months ago

master:

  • 8075512 spec file: do not create /etc/ssh/ssh_config.orig if unchanged
  • 78e9670 ipatests: add test for ticket 9610

ipa-4-12:

  • 09e66dc spec file: do not create /etc/ssh/ssh_config.orig if unchanged
  • 4d51446 ipatests: add test for ticket 9610

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

7 months ago

Log in to comment on this ticket.

Metadata