elf: Ignore LD_AUDIT interfaces if la_version returns 0 [BZ #24122]
authorFlorian Weimer <fweimer@redhat.com>
Tue, 12 Feb 2019 12:36:56 +0000 (13:36 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 12 Feb 2019 12:36:56 +0000 (13:36 +0100)
commit3b856d093f5197637a5927c37d6c07dad8c86d45
treef5116f0f6361bb54070e2350f64e2cf671f6b5b0
parent32db86d558193ad4ad5a00926ce3c350c89eb8df
elf: Ignore LD_AUDIT interfaces if la_version returns 0 [BZ #24122]

This change moves the audit module loading and early notification into
separate functions out of dl_main.

It restores the bug fix from commit
8e889c5da3c5981c5a46a93fec02de40131ac5a6  ("elf: Fix LD_AUDIT for
modules with invalid version (BZ#24122)") which was reverted in commit
83e6b59625f45db1eee93e5684091f740c52a083  ("[elf] Revert 8e889c5da3
(BZ#24122)").

The actual bug fix is the separate error message for the case when
la_version returns zero.  The dynamic linker error message (which is
NULL in this case) is no longer used.  Based on the intended use of
version zero (ignore this module due to explicit request), the message
is only printed if debugging is enabled.
ChangeLog
elf/rtld.c