Bug 1281348 - Upstream unit tests loads the installed shared libraries instead the ones from the build
Upstream unit tests loads the installed shared libraries instead the ones fro...
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: krb5 (Show other bugs)
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: Robbie Harwood
Patrik Kis
: Patch
Depends On:
Blocks: 1297591
  Show dependency treegraph
Reported: 2015-11-12 06:03 EST by Patrik Kis
Modified: 2017-03-21 06:03 EDT (History)
4 users (show)

See Also:
Fixed In Version: krb5-1.10.3-62.el6
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1164304
: 1297591 (view as bug list)
Last Closed: 2017-03-21 06:03:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Patrik Kis 2015-11-12 06:03:21 EST
This problem also exists in RHEL-6.7 version of krb5. It remained unattended due to an error in our test.
Please fix it so we can be sure the intended version of krb5 is tested.

Affected version: krb5-1.10.3-45.el6

The crash mentioned in the original report was not seen, but the installed libraries are loaded according the audit logs. And the fix from upstream patch is also not present on the src of the test.

+++ This bug was initially created as a clone of Bug #1164304 +++

Description of problem:
krb5-1.12.2/src/lib/kadm5/unit-test fails (segfaults) when krb5-pkinit is installed on the sysytem.
Monitoring via audit showed that unit tests from this directory loads pkinit.so from the installed package and not the one that was built.
On top of that, monitoring showed that libs from the installed krb5-libs (whatever version installed) are loaded too.
This questions the effectiveness of upstream testing.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

# rpm -qa krb5\*
# rpm -ivh krb5-1.12.2-8.el7.src.rpm 
... snip ...
# rpmbuild -bc ~/rpmbuild/SPECS/krb5.spec 
... snip ...
# cd ~/rpmbuild/BUILD/krb5-1.12.2/src/
# make runenv.py
LD_LIBRARY_PATH=`echo -L./lib | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;  \
for i in LD_LIBRARY_PATH; do \
	eval echo 'env['\\\'$i\\\''] = '\\\'\$$i\\\'; \
done > pyrunenv.vals
echo "proxy_tls_impl = 'openssl'" >> pyrunenv.vals
echo 'env = {}' > runenv.py
cat pyrunenv.vals >> runenv.py
# cd lib/kadm5/unit-test/
# make check
.. snip ...
	KINIT=../../../clients/kinit/kinit \
	KDESTROY=../../../clients/kdestroy/kdestroy \
	KADMIN_LOCAL=../../../kadmin/cli/kadmin.local \
WARNING: Couldn't find the global config file.
WARNING: Couldn't find tool init file
Test Run By root on Fri Nov 14 10:30:35 2014
Native configuration is powerpc64-redhat-linux-gnu

		=== api tests ===

Schedule of variations:

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
Running ./api.2/crte-policy.exp ...
FAIL: create-policy 1: eof
ERROR: create-policy 1: unexpected failure in init
ERROR: create-policy 2: unexpected failure in init
ERROR: create-policy 3: unexpected failure in init
Comment 1 Robbie Harwood 2015-11-13 13:16:16 EST
I (but mostly Greg) have made some changes on this front upstream, though they were for 1.14 and I have no idea how well they'll backport.
Comment 3 Patrik Kis 2015-11-16 06:55:47 EST
(In reply to Robbie Harwood from comment #1)
> I (but mostly Greg) have made some changes on this front upstream, though
> they were for 1.14 and I have no idea how well they'll backport.

These 2 lines help for krb5-1.10.3 too:
but I can imagine there was more robust fix at the end.
Comment 4 Robbie Harwood 2015-11-16 12:54:35 EST
Indeed, that was my original attempt to fix the issue, but it turns out to run deeper.  The final fix was https://github.com/krb5/krb5/pull/341
Comment 13 errata-xmlrpc 2017-03-21 06:03:13 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.