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

If a library in TSM_LD_LIBRARY_PATH overrides a system one, 990_verify_rootfs fails

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.5
    • rear
    • None
    • No
    • Low
    • rhel-jotnar
    • ssg_core_services
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • All
    • None

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

      When using TSM backup, with a library in TSM_LD_LIBRARY_PATH, it overrides a system one, and in /usr/share/rear/build/default/990_verify_rootfs.sh, the first test changes the LD_LIBRARY_PATH but not the second one so we don't have the detailed error.

      What is the impact of this issue to you?

      Rear does not work

      Please provide the package NVR for which the bug is seen:

      rear-2.6-25.el9.src.rpm

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Put a "broken" library in /opt/tivoli/tsm/client/api/bin64/
      2. run rear
      3. rear fails

      Expected results

      Rear works without error or with details on failing library

       

      Actual results

       

        ++ broken_binaries=' /bin/cryptsetup /usr/lib/systemd/systemd-cryptsetup /usr/lib/systemd/systemd-integritysetup /usr/lib/systemd/systemd-veritysetup'
       
      ++ echo '2024-12-09 14:38:55.230099672 /usr/lib/systemd/systemd-integritysetup requires which was not found by '\''ldd'\'' but exists as /var/tmp/rear.lzi2Fbu8b03qQoU/rootfs
      

      => we don't have the library failing

       

      The issue comes from this line in file /usr/share/rear/build/default/990_verify_rootfs.sh:

      To validate the TSM binaries, it manually set the LD_LIBRARY_PATH to include TSM during the first test:

      {{}}

      if test "$BACKUP" = "TSM" ; then # Use a TSM-specific LD_LIBRARY_PATH to find TSM libraries # see https://github.com/rear/rear/issues/1533 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSM_LD_LIBRARY_PATH fi

      {{}}Then it restore or unset the previous LD_LIBRARY_PATH before the second test:

      {{}}

      test $old_LD_LIBRARY_PATH && export LD_LIBRARY_PATH=$old_LD_LIBRARY_PATH || unset LD_LIBRARY_PATH

      {{}}This is set by default configuration:

      {{}}

      ++ TSM_LD_LIBRARY_PATH=/opt/tivoli/tsm/client/ba/bin:/opt/tivoli/tsm/client/api/bin64:/opt/tivoli/tsm/client/api/bin:/opt/tivoli/tsm/client/api/bin64/cit/bin:/usr/local/ibm/gsk8_64/lib64

      {{}}
      in /usr/share/rear/conf/default.conf:

      {{}}

      TSM_LD_LIBRARY_PATH="/opt/tivoli/tsm/client/ba/bin:/opt/tivoli/tsm/client/api/bin64:/opt/tivoli/tsm/client/api/bin:/opt/tivoli/tsm/client/api/bin64/cit/bin"

      {{}}

      {{=> the set of LD_LIBRARY_PATH to }}TSM_LD_LIBRARY_PATH should be done also in second test, so we get the problematic library.

       

      To avoid the issue, we can set LD_LIBRARY_PATH with default paths first:

      {{}}

      export LD_LIBRARY_PATH=/lib/:/usr/lib/:/lib64/:/usr/lib64/:$LD_LIBRARY_PATH

      {{}}

       

       

              jotnar-project Jötnar Project
              rhn-support-bwelterl Benoit Welterlen
              Pavel Cahyna Pavel Cahyna
              Jötnar Project Jötnar Project
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: