From cbdd57fe9d8e6cd31c66518c0a4bff0e364451e2 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 13 Dec 2018 00:02:15 -0800 Subject: [PATCH] Backport other patches from master to fix build with recent krb5 --- ...rb5-1.17-for-building-the-PAC-plugin.patch | 27 +++++++++++++++ ...cking-krb5_creds-in-test_copy_ccache.patch | 33 +++++++++++++++++++ sssd.spec | 5 +++ 3 files changed, 65 insertions(+) create mode 100644 0001-BUILD-Accept-krb5-1.17-for-building-the-PAC-plugin.patch create mode 100644 0001-tests-fix-mocking-krb5_creds-in-test_copy_ccache.patch diff --git a/0001-BUILD-Accept-krb5-1.17-for-building-the-PAC-plugin.patch b/0001-BUILD-Accept-krb5-1.17-for-building-the-PAC-plugin.patch new file mode 100644 index 0000000..79fb1ca --- /dev/null +++ b/0001-BUILD-Accept-krb5-1.17-for-building-the-PAC-plugin.patch @@ -0,0 +1,27 @@ +From 53e6fdfd881f051898e85448832eafdd2ea09454 Mon Sep 17 00:00:00 2001 +From: Sumit Bose +Date: Thu, 22 Nov 2018 11:33:20 +0100 +Subject: [PATCH] BUILD: Accept krb5 1.17 for building the PAC plugin + +Reviewed-by: Jakub Hrozek +--- + src/external/pac_responder.m4 | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/external/pac_responder.m4 b/src/external/pac_responder.m4 +index e0685f0ce..dc986a1b8 100644 +--- a/src/external/pac_responder.m4 ++++ b/src/external/pac_responder.m4 +@@ -18,7 +18,8 @@ then + Kerberos\ 5\ release\ 1.13* | \ + Kerberos\ 5\ release\ 1.14* | \ + Kerberos\ 5\ release\ 1.15* | \ +- Kerberos\ 5\ release\ 1.16*) ++ Kerberos\ 5\ release\ 1.16* | \ ++ Kerberos\ 5\ release\ 1.17*) + krb5_version_ok=yes + AC_MSG_RESULT([yes]) + ;; +-- +2.20.0 + diff --git a/0001-tests-fix-mocking-krb5_creds-in-test_copy_ccache.patch b/0001-tests-fix-mocking-krb5_creds-in-test_copy_ccache.patch new file mode 100644 index 0000000..029dc4a --- /dev/null +++ b/0001-tests-fix-mocking-krb5_creds-in-test_copy_ccache.patch @@ -0,0 +1,33 @@ +From 08bba3a6e3e4e21f2e20b71cca463d50420aa9ee Mon Sep 17 00:00:00 2001 +From: Sumit Bose +Date: Thu, 22 Nov 2018 11:36:57 +0100 +Subject: [PATCH] tests: fix mocking krb5_creds in test_copy_ccache + +To just test some ccache related functionality without talking to an +actual KDC to get the tickets some needed libkrb5 structs were mocked +based on tests from the MIT Kerberos source code. One struct member +(is_skey) was so far not regarded by libkrb5 for out test case. But a +recent fix for http://krbdev.mit.edu/rt/Ticket/Display.html?id=8718 +changed this and we have to change the mocking. + +Reviewed-by: Jakub Hrozek +--- + src/tests/cmocka/test_copy_ccache.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tests/cmocka/test_copy_ccache.c b/src/tests/cmocka/test_copy_ccache.c +index 84225b6bf..7c76c00e8 100644 +--- a/src/tests/cmocka/test_copy_ccache.c ++++ b/src/tests/cmocka/test_copy_ccache.c +@@ -88,7 +88,7 @@ static int setup_ccache(void **state) + test_creds.times.starttime = 2222; + test_creds.times.endtime = 3333; + test_creds.times.renew_till = 4444; +- test_creds.is_skey = 1; ++ test_creds.is_skey = 0; + test_creds.ticket_flags = 5555; + test_creds.addresses = addrs; + +-- +2.20.0 + diff --git a/sssd.spec b/sssd.spec index 99fe73d..3d45932 100644 --- a/sssd.spec +++ b/sssd.spec @@ -114,6 +114,10 @@ Patch0067: 0067-UTIL-Suppress-Coverity-warning.patch Patch0068: 0068-UTIL-move-and-rename-sysdb_error_to_errno-to-utils.patch Patch0069: 0069-PYSSS-Re-add-the-pysss.getgrouplist-interface.patch +# not in sequence, backported to fix build with newer krb5 +Patch0400: 0001-tests-fix-mocking-krb5_creds-in-test_copy_ccache.patch +Patch0401: 0001-BUILD-Accept-krb5-1.17-for-building-the-PAC-plugin.patch + ### Downstream only patches ### Patch0502: 0502-SYSTEMD-Use-capabilities.patch @@ -1200,6 +1204,7 @@ fi %changelog * Wed Dec 12 2018 Adam Williamson - 2.0.0-6 - Resolves: rhbz#1654537 - sbus: use 120 second default timeout +- Backport two other patches from master to fix build with recent krb5 * Wed Nov 07 2018 Michal Židek - 2.0.0-5 - Resolves: rhbz#1629737 - sssd: Remove python2 (sub)packages from Fedora 30+