kmod/0006-modprobe-print-status-of-allow_unsupported_modules-v.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

76 lines
2.4 KiB
Diff

From e48d1ee5980643f56165a9ee1687ff64f864aeb6 Mon Sep 17 00:00:00 2001
From: Vlad Bespalov <vlad.bespalov@jetstreamsoft.com>
Date: Fri, 8 Jun 2018 21:13:00 +0000
Subject: [PATCH 6/6] modprobe: print status of "allow_unsupported_modules"
variable
In SLES11 modprobe printed everything referenced in /etc/modprobe.d
in SLES12 config parsing changed to explicitly find and print
specific groups of modprobe options, which did not print
the status of "allow_unsupported_modules" option when running
modprobe -c
The proposed patch fixes this deficiency
Patch-mainline: never
---
libkmod/libkmod-config.c | 13 +++++++++++++
libkmod/libkmod.h | 1 +
tools/modprobe.c | 5 +++++
3 files changed, 19 insertions(+)
diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index 550a612..0fc2250 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -1008,6 +1008,19 @@ static struct kmod_config_iter *kmod_config_iter_new(const struct kmod_ctx* ctx,
* @short_description: retrieve current libkmod configuration
*/
+/*
+ * kmod_config_unsupported_allowed:
+ * @ctx: kmod library context
+ *
+ * Retrieve status of unsupported modules
+ */
+KMOD_EXPORT bool kmod_config_unsupported_allowed(const struct kmod_ctx *ctx)
+{
+ struct kmod_config *config = (struct kmod_config *)kmod_get_config(ctx);
+
+ return !config->block_unsupported;
+}
+
/**
* kmod_config_get_blacklists:
* @ctx: kmod library context
diff --git a/libkmod/libkmod.h b/libkmod/libkmod.h
index 352627e..c2b9657 100644
--- a/libkmod/libkmod.h
+++ b/libkmod/libkmod.h
@@ -115,6 +115,7 @@ const char *kmod_config_iter_get_key(const struct kmod_config_iter *iter);
const char *kmod_config_iter_get_value(const struct kmod_config_iter *iter);
bool kmod_config_iter_next(struct kmod_config_iter *iter);
void kmod_config_iter_free_iter(struct kmod_config_iter *iter);
+bool kmod_config_unsupported_allowed(const struct kmod_ctx *ctx);
/*
* kmod_module
diff --git a/tools/modprobe.c b/tools/modprobe.c
index aa4033d..4f1c54a 100644
--- a/tools/modprobe.c
+++ b/tools/modprobe.c
@@ -201,6 +201,11 @@ static int show_config(struct kmod_ctx *ctx)
kmod_config_iter_free_iter(iter);
}
+ // SUSE specific option:
+ if (!kmod_config_unsupported_allowed(ctx)) {
+ puts("allow_unsupported_modules 0\n");
+ }
+
puts("\n# End of configuration files. Dumping indexes now:\n");
fflush(stdout);
--
2.20.1