diff options
author | Robbie Harwood <rharwood@redhat.com> | 2015-09-18 18:42:56 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-09-22 23:19:35 -0400 |
commit | ca66399ac78ed97a901ba4fd1d8e55faf48567d1 (patch) | |
tree | d70265bccd57f647b79808caf98d5ac5ad567297 | |
parent | 883a5a050e98014671eadd47a9c2a221403796a5 (diff) | |
download | gss-proxy-ca66399ac78ed97a901ba4fd1d8e55faf48567d1.tar.gz gss-proxy-ca66399ac78ed97a901ba4fd1d8e55faf48567d1.tar.xz gss-proxy-ca66399ac78ed97a901ba4fd1d8e55faf48567d1.zip |
Use pkg-config to find libgssapi-krb5.so*
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
-rwxr-xr-x | proxy/tests/runtests.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/proxy/tests/runtests.py b/proxy/tests/runtests.py index cb8c73c..b7ef6e6 100755 --- a/proxy/tests/runtests.py +++ b/proxy/tests/runtests.py @@ -216,10 +216,19 @@ def setup_gssapi_env(testdir, wrapenv): os.symlink(libgssapi_dir, GSSAPI_SYMLINK_DIR) os.makedirs(libgssapi_mechd_dir) + lib = None + try: + libs = subprocess.check_output(['pkg-config', '--libs-only-L', 'krb5-gssapi']) + except: + raise ValueError('libgssapi not available') + # find them all and get the longest name in the hopes # we hit /usr/lib64/libgssapi_krb5.so.2.2 in preference - libs = glob.glob("/usr/lib*/libgssapi*.so*") - lib = None + if libs is not None and libs.startswith("-L"): + libs = glob.glob(libs[2:].strip() + "/libgssapi*.so*") + else: + libs = glob.glob("/usr/lib*/libgssapi*.so*") + lib_len = 0 for l in libs: if len(l) > lib_len: |