From bffc62bbd8fd2f3de66fb12d111e4d9afadfee26 Mon Sep 17 00:00:00 2001 From: Julien Rische Date: Wed, 7 Dec 2022 13:52:09 +0100 Subject: [PATCH] Make tests compatible with sssd_krb5_locator_plugin.so The sssd_krb5_locator_plugin.so plugin provided by sssd-client conflicts with the upstream test t_discover_uri.py. The test has to be modified in order to avoid false positive. Resolves: rhbz#2151513 Signed-off-by: Julien Rische --- ...tests-compatible-with-sssd_krb5_loca.patch | 41 +++++++++++++++++++ krb5.spec | 5 ++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0013-downstream-Make-tests-compatible-with-sssd_krb5_loca.patch diff --git a/0013-downstream-Make-tests-compatible-with-sssd_krb5_loca.patch b/0013-downstream-Make-tests-compatible-with-sssd_krb5_loca.patch new file mode 100644 index 0000000..a094f87 --- /dev/null +++ b/0013-downstream-Make-tests-compatible-with-sssd_krb5_loca.patch @@ -0,0 +1,41 @@ +From 9aa12e932f08651785519890896647069e7a30b1 Mon Sep 17 00:00:00 2001 +From: Julien Rische +Date: Wed, 7 Dec 2022 13:22:42 +0100 +Subject: [PATCH] [downstream] Make tests compatible with + sssd_krb5_locator_plugin.so + +The sssd_krb5_locator_plugin.so plugin provided by sssd-client conflicts +with the upstream test t_discover_uri.py. The test has to be modified in +order to avoid false positive. +--- + src/lib/krb5/os/t_discover_uri.py | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/lib/krb5/os/t_discover_uri.py b/src/lib/krb5/os/t_discover_uri.py +index 87bac17929..26bc95a8dc 100644 +--- a/src/lib/krb5/os/t_discover_uri.py ++++ b/src/lib/krb5/os/t_discover_uri.py +@@ -1,3 +1,4 @@ ++from os.path import exists + from k5test import * + + entries = ('URI _kerberos.TEST krb5srv::kkdcp:https://kdc1 1 1\n', +@@ -37,8 +38,14 @@ realm.env['RESOLV_WRAPPER_HOSTS'] = hosts_filename + out = realm.run(['./t_locate_kdc', 'TEST'], env=realm.env) + l = out.splitlines() + ++if (exists('/usr/lib/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so') ++ or exists('/usr/lib64/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so')): ++ line_range = range(6, 14) ++else: ++ line_range = range(4, 12) ++ + j = 0 +-for i in range(4, 12): ++for i in line_range: + if l[i].strip() != expected[j]: + fail('URI answers do not match') + j += 1 +-- +2.38.1 + diff --git a/krb5.spec b/krb5.spec index 4e9465a..c2958d9 100644 --- a/krb5.spec +++ b/krb5.spec @@ -95,6 +95,7 @@ Patch09: 0009-Simplify-plugin-loading-code.patch Patch10: 0010-Update-error-checking-for-OpenSSL-CMS_verify.patch Patch11: 0011-downstream-Catch-SHA-1-digest-disallowed-error-for-P.patch Patch12: 0012-Add-and-use-ts_interval-helper.patch +Patch13: 0013-downstream-Make-tests-compatible-with-sssd_krb5_loca.patch License: MIT URL: https://web.mit.edu/kerberos/www/ @@ -659,7 +660,9 @@ exit 0 %{_libdir}/libkadm5srv_mit.so.* %changelog -* Tue Nov 22 2022 Julien Rische - 1.20.1-1 +* Wed Dec 07 2022 Julien Rische - 1.20.1-1 +- Make tests compatible with sssd-client +- Resolves: rhbz#2151513 - Remove invalid password expiry warning - Resolves: rhbz#2121099 - Update error checking for OpenSSL CMS_verify