1--- a/k5test/_utils.py
2+++ b/k5test/_utils.py
3@@ -63,12 +63,12 @@ def find_plugin_dir():
4
5 # if there was no LD_LIBRARY_PATH, or the above failed
6 if _PLUGIN_DIR is None:
7- lib_dir = os.path.join(get_output("krb5-config --prefix"), "lib64")
8+ lib_dir = os.path.join(get_output("@krb5Dev@/bin/krb5-config --prefix"), "lib64")
9 _PLUGIN_DIR = _decide_plugin_dir(_find_plugin_dirs_installed(lib_dir))
10
11 # /usr/lib64 seems only to be distinct on Fedora/RHEL/Centos family
12 if _PLUGIN_DIR is None:
13- lib_dir = os.path.join(get_output("krb5-config --prefix"), "lib")
14+ lib_dir = os.path.join(get_output("@krb5Dev@/bin/krb5-config --prefix"), "lib")
15 _PLUGIN_DIR = _decide_plugin_dir(_find_plugin_dirs_installed(lib_dir))
16
17 if _PLUGIN_DIR is not None:
18@@ -87,7 +87,7 @@ def _decide_plugin_dir(dirs):
19
20 for path in shortest_first:
21 # check to see if it actually contains .so files
22- if get_output('find %s -name "*.so"' % path):
23+ if get_output('@findutils@/bin/find %s -name "*.so"' % path):
24 return path
25
26 return None
27@@ -96,7 +96,7 @@ def _decide_plugin_dir(dirs):
28 def _find_plugin_dirs_installed(search_path):
29 try:
30 options_raw = get_output(
31- "find %s/ -type d \( ! -executable -o ! -readable \) "
32+ "@findutils@/bin/find %s/ -type d \( ! -executable -o ! -readable \) "
33 "-prune -o "
34 '-type d -path "*/krb5/plugins" -print' % search_path,
35 stderr=subprocess.STDOUT,
36@@ -111,7 +111,7 @@ def _find_plugin_dirs_installed(search_path):
37
38
39 def _find_plugin_dirs_src(search_path):
40- options_raw = get_output("find %s/../ -type d -name plugins" % search_path)
41+ options_raw = get_output("@findutils@/bin/find %s/../ -type d -name plugins" % search_path)
42
43 if options_raw:
44 return options_raw.split("\n")
45--- a/k5test/realm.py
46+++ b/k5test/realm.py
47@@ -84,7 +84,7 @@ class K5Realm(metaclass=abc.ABCMeta):
48 provider_cls = cls
49
50 if provider_cls == K5Realm:
51- krb5_config = _discover_path("krb5-config", "/usr/bin/krb5-config", kwargs)
52+ krb5_config = _discover_path("krb5-config", "@krb5Dev@/bin/krb5-config", kwargs)
53
54 try:
55 krb5_version = subprocess.check_output(
56@@ -96,7 +96,7 @@ class K5Realm(metaclass=abc.ABCMeta):
57
58 # macOS output doesn't contain Heimdal
59 if "heimdal" in krb5_version.lower() or (
60- sys.platform == "darwin" and krb5_config == "/usr/bin/krb5-config"
61+ sys.platform == "darwin" and krb5_config == "@krb5Dev@/bin/krb5-config"
62 ):
63 provider_cls = HeimdalRealm
64 else:
65@@ -457,14 +457,14 @@ class MITRealm(K5Realm):
66 @property
67 def _default_paths(self):
68 return [
69- ("kdb5_util", "kdb5_util", "/usr/sbin/kdb5_util"),
70- ("krb5kdc", "krb5kdc", "/usr/sbin/krb5kdc"),
71- ("kadmin", "kadmin", "/usr/bin/kadmin"),
72- ("kadmin_local", "kadmin.local", "/usr/sbin/kadmin.local"),
73- ("kadmind", "kadmind", "/usr/sbin/kadmind"),
74- ("kprop", "kprop", "/usr/sbin/kprop"),
75- ("_kinit", "kinit", "/usr/bin/kinit"),
76- ("_klist", "klist", "/usr/bin/klist"),
77+ ("kdb5_util", "kdb5_util", "@krb5@/bin/kdb5_util"),
78+ ("krb5kdc", "krb5kdc", "@krb5@/bin/krb5kdc"),
79+ ("kadmin", "kadmin", "@krb5@/bin/kadmin"),
80+ ("kadmin_local", "kadmin.local", "@krb5@/bin/kadmin.local"),
81+ ("kadmind", "kadmind", "@krb5@/bin/kadmind"),
82+ ("kprop", "kprop", "@krb5@/bin/kprop"),
83+ ("_kinit", "kinit", "@krb5@/bin/kinit"),
84+ ("_klist", "klist", "@krb5@/bin/klist"),
85 ]
86
87 @property
88@@ -625,12 +625,12 @@ class HeimdalRealm(K5Realm):
89
90 return [
91 ("krb5kdc", "kdc", os.path.join(base, "kdc")),
92- ("kadmin", "kadmin", "/usr/bin/kadmin"),
93- ("kadmin_local", "kadmin", "/usr/bin/kadmin"),
94+ ("kadmin", "kadmin", "@krb5@/bin/kadmin"),
95+ ("kadmin_local", "kadmin", "@krb5@/bin/kadmin"),
96 ("kadmind", "kadmind", os.path.join(base, "kadmind")),
97- ("_kinit", "kinit", "/usr/bin/kinit"),
98- ("_klist", "klist", "/usr/bin/klist"),
99- ("_ktutil", "ktutil", "/usr/bin/ktutil"),
100+ ("_kinit", "kinit", "@krb5@/bin/kinit"),
101+ ("_klist", "klist", "@krb5@/bin/klist"),
102+ ("_ktutil", "ktutil", "@krb5@/bin/ktutil"),
103 ]
104
105 @property
106--- a/k5test/unit.py
107+++ b/k5test/unit.py
108@@ -39,7 +39,7 @@ _KRB_VERSION = None
109 def krb_minversion_test(target_version, problem, provider=None):
110 global _KRB_VERSION
111 if _KRB_VERSION is None:
112- _KRB_VERSION = _utils.get_output("krb5-config --version")
113+ _KRB_VERSION = _utils.get_output("@krb5Dev@/bin/krb5-config --version")
114 _KRB_VERSION = _KRB_VERSION.split(" ")[-1].split(".")
115
116 def make_ext_test(func):