kmod/0005-Do-not-filter-unsupported-modules-when-running-a-van.patch
Jan Engelhardt 81cdb97d27 Accepting request 674337 from home:michals
- Enable PKCS#7 signature parsing again - requires openssl
- Fix testsuite build - requires kernel-default-devel
- Rediff the SUSE patches and rename starting with 0001.

- Update to new upstream release 26
  * depmod now handles parallel invocations better by protecting
    the temporary files being used.
  * modprobe has a new --show-exports option. Under the hood,
    this reads the .symtab and .strtab sections rather than
    __versions so it shows useful data even if kernel is
    configured without modversions (CONFIG_MODVERSIONS).
  * modinfo supports PKCS#7 parsing by using openssl.
- Replaced the asn1c-based parser by an openssl-based PKCS
  parser.
- Remove libkmod-signature-Fix-crash-when-module-signature-is.patch,
  libkmod-signature-pkcs-7-fix-crash-when-signer-info-.patch,
  libkmod-signature-implement-pkcs7-parsing-with-asn1c.patch
  (not accepted upstream)
- Remove enum.patch,
  depmod-Prevent-module-dependency-files-corruption-du.patch,
  depmod-Prevent-module-dependency-files-missing-durin.patch,
  depmod-shut-up-gcc-insufficinet-buffer-warning.patch
  (accepted upstream)

- Enable PKCS#7 signature parsing again - requires openssl
- Rediff the SUSE patches and rename starting with 0001.

OBS-URL: https://build.opensuse.org/request/show/674337
OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=158
2019-02-12 23:23:22 +00:00

53 lines
1.5 KiB
Diff

From 9d2f7d1e372d79dfe732992effb33daf4ee56235 Mon Sep 17 00:00:00 2001
From: Michal Marek <mmarek@suse.cz>
Date: Fri, 4 Apr 2014 10:08:01 +0200
Subject: [PATCH 5/6] Do not filter unsupported modules when running a vanilla
kernel
References: bnc#871066
Patch-mainline: never
---
libkmod/libkmod-config.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index 07d6a9e..550a612 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -566,6 +566,18 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)
return 0;
}
+/*
+ * Check if kernel is built with the SUSE "suppported-flag" patch
+ */
+static int is_suse_kernel(void)
+{
+ if (access("/proc/sys/kernel/", F_OK) == 0 &&
+ access("/proc/sys/kernel/unsupported", F_OK) == -1 &&
+ errno == ENOENT)
+ return 0;
+ return 1;
+}
+
/*
* Take an fd and own it. It will be closed on return. filename is used only
* for debug messages
@@ -657,9 +669,10 @@ static int kmod_config_parse(struct kmod_config *config, int fd,
goto syntax_error;
if (streq(param, "yes") || streq(param, "1"))
config->block_unsupported = 0;
- else if (streq(param, "no") || streq(param, "0"))
- config->block_unsupported = 1;
- else
+ else if (streq(param, "no") || streq(param, "0")) {
+ if (is_suse_kernel())
+ config->block_unsupported = 1;
+ } else
goto syntax_error;
} else {
syntax_error:
--
2.20.1