From 5ddec3de5b6d7cf3711fe18df7902013550f18ea8e586bb4b6f2d2698b45aeaf Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 21 Aug 2019 13:50:19 +0000 Subject: [PATCH] Accepting request 724378 from home:adkorte:branches:openSUSE:Factory Kernel 5.2 removed the flags field from the crypto shash_desc struct OBS-URL: https://build.opensuse.org/request/show/724378 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/xtables-addons?expand=0&rev=128 --- remove_flags.patch | 24 ++++++++++++++++++++++++ xtables-addons.changes | 6 ++++++ xtables-addons.spec | 2 ++ 3 files changed, 32 insertions(+) create mode 100644 remove_flags.patch diff --git a/remove_flags.patch b/remove_flags.patch new file mode 100644 index 0000000..687cee0 --- /dev/null +++ b/remove_flags.patch @@ -0,0 +1,24 @@ +--- xtables-addons-3.3/extensions/pknock/xt_pknock.c 2019-03-07 10:24:08.000000000 +0100 ++++ xtables-addons-3.3/extensions/pknock/xt_pknock.c 2019-08-03 12:03:23.853137954 +0200 +@@ -1125,7 +1125,9 @@ static int __init xt_pknock_mt_init(void + + crypto.size = crypto_shash_digestsize(crypto.tfm); + crypto.desc.tfm = crypto.tfm; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) + crypto.desc.flags = 0; ++#endif + + pde = proc_mkdir("xt_pknock", init_net.proc_net); + if (pde == NULL) { +--- xtables-addons-3.3/extensions/xt_SYSRQ.c 2019-03-07 10:24:08.000000000 +0100 ++++ xtables-addons-3.3/extensions/xt_SYSRQ.c 2019-08-03 12:16:23.823303357 +0200 +@@ -114,7 +114,9 @@ static unsigned int sysrq_tg(const void + } + + desc.tfm = sysrq_tfm; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) + desc.flags = 0; ++#endif + ret = crypto_shash_init(&desc); + if (ret != 0) + goto hash_fail; diff --git a/xtables-addons.changes b/xtables-addons.changes index 5ab0da1..c89149f 100644 --- a/xtables-addons.changes +++ b/xtables-addons.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Aug 4 10:29:06 UTC 2019 - Arjen de Korte + +- Remove unused variable 'flags' from 'struct shash_desc' + * Support for Linux 5.2 (add remove_flags.patch) + ------------------------------------------------------------------- Thu Mar 7 09:22:45 UTC 2019 - Jan Engelhardt diff --git a/xtables-addons.spec b/xtables-addons.spec index 3d491c3..469330e 100644 --- a/xtables-addons.spec +++ b/xtables-addons.spec @@ -30,6 +30,7 @@ Source: http://downloads.sf.net/%name/%name-%version.tar.xz Source2: http://downloads.sf.net/%name/%name-%version.tar.asc Source3: %name-preamble Source4: %name.keyring +Patch0: remove_flags.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %kernel_module_package_buildreqs BuildRequires: kernel-syms >= 4.15 @@ -71,6 +72,7 @@ main kernel/iptables packages. %prep %setup -q +%patch0 -p1 %build pushd ../